Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15400557
D17124.id41181.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
D17124.id41181.diff
View Options
diff --git a/src/applications/phid/query/PhabricatorObjectListQuery.php b/src/applications/phid/query/PhabricatorObjectListQuery.php
--- a/src/applications/phid/query/PhabricatorObjectListQuery.php
+++ b/src/applications/phid/query/PhabricatorObjectListQuery.php
@@ -149,7 +149,22 @@
$missing = array();
foreach ($name_map as $key => $name) {
if (empty($objects[$key])) {
- $missing[] = $name;
+ $missing[$key] = $name;
+ }
+ }
+
+ $result = array_unique(mpull($objects, 'getPHID'));
+
+ // For values which are plain PHIDs of allowed types, let them through
+ // unchecked. This can happen occur if subscribers or reviewers which the
+ // revision author does not have permission to see are added by Herald
+ // rules. Any actual edits will be checked later: users are not allowed
+ // to add new reviewers they can't see, but they can touch a field which
+ // contains them.
+ foreach ($missing as $key => $value) {
+ if (isset($allowed[phid_get_type($value)])) {
+ unset($missing[$key]);
+ $result[$key] = $value;
}
}
@@ -181,8 +196,6 @@
}
}
- $result = array_unique(mpull($objects, 'getPHID'));
-
if ($suffixes) {
foreach ($result as $key => $phid) {
$result[$key] = array(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 18, 12:30 PM (1 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7704513
Default Alt Text
D17124.id41181.diff (1 KB)
Attached To
Mode
D17124: Make restricted objects in commit messages work more consistently with the web UI
Attached
Detach File
Event Timeline
Log In to Comment