Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F83547
D7603.diff
All Users
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
D7603.diff
View Options
diff --git a/src/applications/differential/query/DifferentialRevisionQuery.php b/src/applications/differential/query/DifferentialRevisionQuery.php
--- a/src/applications/differential/query/DifferentialRevisionQuery.php
+++ b/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.
diff --git a/src/applications/policy/filter/PhabricatorPolicyFilter.php b/src/applications/policy/filter/PhabricatorPolicyFilter.php
--- a/src/applications/policy/filter/PhabricatorPolicyFilter.php
+++ b/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
Details
Attached
Mime Type
text/x-diff
Storage Engine
amazon-s3
Storage Format
Raw Data
Storage Handle
phabricator/nv/6w/fkenf7vlnsh2iz3m
Default Alt Text
D7603.diff (1 KB)
Attached To
Mode
D7603: Never raise policy exceptions for the omnipotent viewer
Attached
Detach File
Event Timeline
Log In to Comment