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;