HomePhabricator

When computing the "Subscribers" policy, use materialized membership

Description

When computing the "Subscribers" policy, use materialized membership

Summary:
Fixes T13104. The "Subscribers" policy implementation still uses older logic to query project membership and misses parent projects and milestones which a user is a member of.

Instead of doing an edge query for explicit membership, use a project query to find all projects the viewer belongs to.

Test Plan:

  • Created a parent project A.
  • Created a subproject B.
  • As Bailey, created a task with "Visible To: Bailey, Subscribers".
  • Added parent project A as a task subscriber.

Then:

  • As Alice, verified I could not see the task.
  • As Alice, joined subproject B.
    • Before patch: still unable to see the task.
    • After patch: can see the task.
  • Removed parent project A as a subscriber, verified I could no longer see the task.

Maniphest Tasks: T13104

Differential Revision: https://secure.phabricator.com/D19213