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)
Sat, Dec 21, 5:55 PM
Unknown Object (File)
Sat, Dec 21, 4:30 PM
Unknown Object (File)
Sat, Dec 21, 4:30 PM
Unknown Object (File)
Sat, Dec 21, 4:30 PM
Unknown Object (File)
Sat, Dec 21, 4:30 PM
Unknown Object (File)
Sat, Dec 21, 4:30 PM
Unknown Object (File)
Sat, Nov 30, 4:17 AM
Unknown Object (File)
Thu, Nov 28, 5:55 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.