Page MenuHomePhabricator

[lib] Filter permission strings with member_ prefix for non-members
ClosedPublic

Authored by ashoat on Aug 7 2024, 1:21 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Sep 7, 1:47 PM
Unknown Object (File)
Sat, Sep 7, 1:47 PM
Unknown Object (File)
Sat, Sep 7, 11:37 AM
Unknown Object (File)
Sat, Sep 7, 11:36 AM
Unknown Object (File)
Sat, Aug 31, 2:13 PM
Unknown Object (File)
Fri, Aug 30, 2:40 PM
Unknown Object (File)
Fri, Aug 30, 11:19 AM
Unknown Object (File)
Fri, Aug 30, 11:15 AM
Subscribers
None

Details

Summary

This diff implements the primary function of our new member_ prefix: to filter the permission string if the user is not a member of the thread in question.

Test Plan

The whole stack was tested as follows:

  1. Unit tests from D9686, which toggle user-surfaced permissions on and off and make sure no difference is caught. This ensures that the original issue introduced in D9686 isn't reintroduced
  2. Careful review of each descendant permission removed in D9686
  3. Create a community as userA and add userB. Grant tagging permissions to all members. Make sure userB can tag inside non-root channels
  4. Do above, then create a channel without userB, and make sure userB can't tag there either (or do anything other than view). This is the repro described here
  5. Do above, but also create a thread inside the channel (as userA) and make sure userB can't do anything inside the thread other than view, until they join the parent channel

Depends on D13013

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable