Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15377527
D21811.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
928 B
Referenced Files
None
Subscribers
None
D21811.diff
View Options
diff --git a/src/applications/settings/storage/PhabricatorUserPreferences.php b/src/applications/settings/storage/PhabricatorUserPreferences.php
--- a/src/applications/settings/storage/PhabricatorUserPreferences.php
+++ b/src/applications/settings/storage/PhabricatorUserPreferences.php
@@ -219,11 +219,15 @@
}
}
- switch ($this->getBuiltinKey()) {
- case self::BUILTIN_GLOBAL_DEFAULT:
- // NOTE: Without this policy exception, the logged-out viewer can not
- // see global preferences.
- return true;
+ $builtin_key = $this->getBuiltinKey();
+
+ $is_global = ($builtin_key === self::BUILTIN_GLOBAL_DEFAULT);
+ $is_view = ($capability === PhabricatorPolicyCapability::CAN_VIEW);
+
+ if ($is_global && $is_view) {
+ // NOTE: Without this policy exception, the logged-out viewer can not
+ // see global preferences.
+ return true;
}
return false;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Mar 14, 9:25 AM (1 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7291006
Default Alt Text
D21811.diff (928 B)
Attached To
Mode
D21811: Correct overbroad automatic capability grant of global settings objects
Attached
Detach File
Event Timeline
Log In to Comment