Page MenuHomePhabricator

D21811.diff
No OneTemporary

D21811.diff

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

Mime Type
text/plain
Expires
Wed, May 15, 8:54 AM (2 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6285137
Default Alt Text
D21811.diff (928 B)

Event Timeline