Page MenuHomePhabricator

[lib] Narrow types in `memberHasAdminPowers` call stack to remove `invariant`
ClosedPublic

Authored by atul on Jun 3 2024, 1:43 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 11, 9:41 AM
Unknown Object (File)
Mon, Nov 11, 1:55 AM
Unknown Object (File)
Sun, Nov 10, 6:22 PM
Unknown Object (File)
Fri, Nov 8, 1:52 PM
Unknown Object (File)
Fri, Nov 8, 7:15 AM
Unknown Object (File)
Sun, Nov 3, 6:37 PM
Unknown Object (File)
Sun, Nov 3, 3:31 PM
Unknown Object (File)
Oct 23 2024, 11:13 AM
Subscribers
None

Details

Summary

Narrow types from innerThreadFrozenDueToBlock down to memberHasAdminPowers, removing ThreadInfo and RelativeMemberInfo such that we can remove the invariant introduced in D12265.

We're now good with removing permissions field from ThreadInfo, now we just need to remove it from RawThreadInfo and we can proceed to migration and toggling shape of RawThreadInfo on keyserver based on codeVersion checks.

There's some tidying up to do eg removing skipMemberAdminRoleCheck and pulling out logic common to threadIsWithBlockedUserOnly and threadIsWithBlockedUserOnlyWithoutAdminRoleCheck, but will handle those in followup diffs for convenience.


Depends on D12290

Test Plan

just flow.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

atul published this revision for review.Jun 3 2024, 1:49 PM
This revision is now accepted and ready to land.Jun 4 2024, 1:55 AM
This revision was landed with ongoing or failed builds.Jun 16 2024, 5:50 PM
This revision was automatically updated to reflect the committed changes.