Page MenuHomePhabricator

D7603.id17157.diff
No OneTemporary

D7603.id17157.diff

Index: src/applications/differential/query/DifferentialRevisionQuery.php
===================================================================
--- src/applications/differential/query/DifferentialRevisionQuery.php
+++ src/applications/differential/query/DifferentialRevisionQuery.php
@@ -429,6 +429,13 @@
continue;
}
+ if ($this->getViewer()->isOmnipotent()) {
+ // The viewer is omnipotent. Allow the revision to load even without
+ // a repository.
+ $revision->attachRepository(null);
+ continue;
+ }
+
// The revision has an associated repository, and the viewer can't see
// it, and the viewer has no special capabilities. Filter out this
// revision.
Index: src/applications/policy/filter/PhabricatorPolicyFilter.php
===================================================================
--- src/applications/policy/filter/PhabricatorPolicyFilter.php
+++ src/applications/policy/filter/PhabricatorPolicyFilter.php
@@ -259,6 +259,15 @@
return;
}
+ if ($this->viewer->isOmnipotent()) {
+ // Never raise policy exceptions for the omnipotent viewer. Although we
+ // will never normally issue a policy rejection for the omnipotent
+ // viewer, we can end up here when queries blanket reject objects that
+ // have failed to load, without distinguishing between nonexistent and
+ // nonvisible objects.
+ return;
+ }
+
$capobj = PhabricatorPolicyCapability::getCapabilityByKey($capability);
$rejection = null;
if ($capobj) {

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 15, 7:02 PM (4 d, 17 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6751816
Default Alt Text
D7603.id17157.diff (1 KB)

Event Timeline