Page MenuHomePhabricator

[lib] Introduce `patchRawThreadInfosWithSpecialRole()`
ClosedPublic

Authored by atul on Feb 13 2024, 1:41 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Dec 14, 10:59 PM
Unknown Object (File)
Thu, Dec 12, 10:47 AM
Unknown Object (File)
Tue, Dec 10, 11:20 PM
Unknown Object (File)
Fri, Nov 29, 3:11 AM
Unknown Object (File)
Mon, Nov 25, 1:09 PM
Unknown Object (File)
Nov 22 2024, 5:57 AM
Unknown Object (File)
Nov 22 2024, 12:53 AM
Unknown Object (File)
Nov 7 2024, 3:17 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