Page MenuHomePhabricator

[lib] Introduce `patchRawThreadInfosWithSpecialRole()`
ClosedPublic

Authored by atul on Feb 13 2024, 1:41 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 22, 5:57 AM
Unknown Object (File)
Fri, Nov 22, 12:53 AM
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
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