Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14038858
D16840.id40553.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D16840.id40553.diff
View Options
diff --git a/src/applications/project/query/PhabricatorProjectQuery.php b/src/applications/project/query/PhabricatorProjectQuery.php
--- a/src/applications/project/query/PhabricatorProjectQuery.php
+++ b/src/applications/project/query/PhabricatorProjectQuery.php
@@ -260,14 +260,14 @@
$all_graph = $this->getAllReachableAncestors($projects);
- if ($this->needAncestorMembers || $this->needWatchers) {
- $src_projects = $all_graph;
- } else {
- $src_projects = $projects;
- }
+ // NOTE: Although we may not need much information about ancestors, we
+ // always need to test if the viewer is a member, because we will return
+ // ancestor projects to the policy filter via ExtendedPolicy calls. If
+ // we skip populating membership data on a parent, the policy framework
+ // will think the user is not a member of the parent project.
$all_sources = array();
- foreach ($src_projects as $project) {
+ foreach ($all_graph as $project) {
// For milestones, we need parent members.
if ($project->isMilestone()) {
$parent_phid = $project->getParentProjectPHID();
@@ -306,7 +306,7 @@
}
$membership_projects = array();
- foreach ($src_projects as $project) {
+ foreach ($all_graph as $project) {
$project_phid = $project->getPHID();
if ($project->isMilestone()) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 12, 2:29 AM (6 d, 9 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6716372
Default Alt Text
D16840.id40553.diff (1 KB)
Attached To
Mode
D16840: Fix a complicated object caching issue with the policy filter
Attached
Detach File
Event Timeline
Log In to Comment