Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14053501
D7603.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
D7603.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 16, 4:42 PM (3 d, 19 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6751816
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