Page MenuHomePhabricator

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

Authored by atul on Mon, Jun 3, 1:43 PM.
Tags
None
Referenced Files
F2054764: D12292.diff
Thu, Jun 20, 5:05 AM
F2052799: D12292.id.diff
Thu, Jun 20, 12:24 AM
Unknown Object (File)
Sat, Jun 15, 5:20 AM
Unknown Object (File)
Fri, Jun 14, 6:32 PM
Unknown Object (File)
Fri, Jun 14, 7:27 AM
Unknown Object (File)
Wed, Jun 12, 9:41 AM
Unknown Object (File)
Mon, Jun 10, 6:12 PM
Unknown Object (File)
Mon, Jun 10, 5:02 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.Mon, Jun 3, 1:49 PM
This revision is now accepted and ready to land.Tue, Jun 4, 1:55 AM
This revision was landed with ongoing or failed builds.Sun, Jun 16, 5:50 PM
This revision was automatically updated to reflect the committed changes.