Page MenuHomePhabricator

[lib] Introduce `patchRawThreadInfosWithSpecialRole()`
ClosedPublic

Authored by atul on Feb 13 2024, 1:41 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 25, 12:49 PM
Unknown Object (File)
Thu, Apr 25, 12:48 PM
Unknown Object (File)
Apr 7 2024, 6:07 PM
Unknown Object (File)
Feb 21 2024, 7:22 AM
Unknown Object (File)
Feb 20 2024, 8:34 PM
Unknown Object (File)
Feb 18 2024, 10:07 AM
Unknown Object (File)
Feb 17 2024, 11:40 AM
Unknown Object (File)
Feb 17 2024, 10:57 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