Page MenuHomePhabricator

D16840.id40556.diff
No OneTemporary

D16840.id40556.diff

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

Mime Type
text/plain
Expires
Sun, Nov 10, 2:01 AM (1 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6716372
Default Alt Text
D16840.id40556.diff (1 KB)

Event Timeline