Page MenuHomePhabricator

When computing the "Subscribers" policy, use materialized membership
ClosedPublic

Authored by epriestley on Mar 13 2018, 3:27 PM.
Tags
None
Referenced Files
F15426038: D19213.diff
Sun, Mar 23, 6:53 AM
F15420501: D19213.id46009.diff
Fri, Mar 21, 2:27 PM
F15411155: D19213.diff
Wed, Mar 19, 8:52 AM
F15378359: D19213.diff
Thu, Mar 13, 2:01 PM
F15375720: D19213.id46009.diff
Wed, Mar 12, 11:47 PM
Unknown Object (File)
Feb 20 2025, 4:49 PM
Unknown Object (File)
Feb 20 2025, 4:49 PM
Unknown Object (File)
Feb 20 2025, 4:49 PM
Subscribers
None

Details

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.

Diff Detail

Repository
rP Phabricator
Branch
proj1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 19827
Build 26864: Run Core Tests
Build 26863: arc lint + arc unit

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.Mar 13 2018, 3:28 PM
epriestley requested review of this revision.
This revision was automatically updated to reflect the committed changes.