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)
Sun, Nov 3, 6:37 PM
Unknown Object (File)
Sun, Nov 3, 3:31 PM
Unknown Object (File)
Wed, Oct 23, 11:13 AM
Unknown Object (File)
Thu, Oct 10, 10:53 PM
Unknown Object (File)
Thu, Oct 10, 10:53 PM
Unknown Object (File)
Thu, Oct 10, 10:52 PM
Unknown Object (File)
Sep 25 2024, 10:49 PM
Unknown Object (File)
Sep 25 2024, 10:49 PM
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.