diff --git a/src/applications/policy/query/PhabricatorPolicyQuery.php b/src/applications/policy/query/PhabricatorPolicyQuery.php index 246741786d..37c38a5d6b 100644 --- a/src/applications/policy/query/PhabricatorPolicyQuery.php +++ b/src/applications/policy/query/PhabricatorPolicyQuery.php @@ -190,6 +190,11 @@ final class PhabricatorPolicyQuery foreach ($projects as $project) { $phids[] = $project->getPHID(); } + + // Include the "current viewer" policy. This improves consistency, but + // is also useful for creating private instances of normally-shared object + // types, like repositories. + $phids[] = $viewer->getPHID(); } $capabilities = $this->object->getCapabilities();