Page MenuHomePhabricator

[lib] Introduce `patchRawThreadInfosWithSpecialRole()`
ClosedPublic

Authored by atul on Feb 13 2024, 1:41 PM.
Tags
None
Referenced Files
F4956760: D11056.diff
Sat, Mar 22, 9:48 AM
Unknown Object (File)
Sat, Feb 22, 3:07 AM
Unknown Object (File)
Sat, Feb 22, 3:07 AM
Unknown Object (File)
Sat, Feb 22, 3:07 AM
Unknown Object (File)
Sat, Feb 22, 3:07 AM
Unknown Object (File)
Sat, Feb 22, 3:07 AM
Unknown Object (File)
Feb 7 2025, 2:13 PM
Unknown Object (File)
Jan 31 2025, 11:34 AM
Subscribers

Details

Summary

This will be used as part of native migration to add specialRole field to RoleInfos. This function is (RawThreadInfos) => RawThreadInfos which we can pass to updateClientDBThreadStoreThreadInfos as the migrationFunc.

Test Plan

Unit tests. Want to test this behavior outside of the running app so it was easier to ensure correct behavior w/ debugger:

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

atul published this revision for review.Feb 13 2024, 1:46 PM
tomek added inline comments.
lib/permissions/special-roles.test.js
217–225 ↗(On Diff #37041)

Just for the completeness of the test it could make sense to check if the role isn't default or admin, we don't set the specialRole field.

This revision is now accepted and ready to land.Feb 14 2024, 9:08 AM