Page MenuHomePhabricator

[lib] Introduce `patchRawThreadInfosWithSpecialRole()`
ClosedPublic

Authored by atul on Feb 13 2024, 1:41 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 7, 3:17 AM
Unknown Object (File)
Oct 15 2024, 9:35 PM
Unknown Object (File)
Oct 15 2024, 9:35 PM
Unknown Object (File)
Oct 15 2024, 9:35 PM
Unknown Object (File)
Oct 15 2024, 9:35 PM
Unknown Object (File)
Oct 15 2024, 9:35 PM
Unknown Object (File)
Sep 4 2024, 3:22 PM
Unknown Object (File)
Sep 4 2024, 3:22 PM
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
Branch
arcpatch-D11056 (branched from master)
Lint
No Lint Coverage
Unit
No Test Coverage

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