Changeset View
Changeset View
Standalone View
Standalone View
src/applications/policy/storage/PhabricatorPolicy.php
Show First 20 Lines • Show All 242 Lines • ▼ Show 20 Lines | public static function getOpaquePolicyExplanation( | ||||
if ($rule) { | if ($rule) { | ||||
return $rule->getPolicyExplanation(); | return $rule->getPolicyExplanation(); | ||||
} | } | ||||
switch ($policy) { | switch ($policy) { | ||||
case PhabricatorPolicies::POLICY_PUBLIC: | case PhabricatorPolicies::POLICY_PUBLIC: | ||||
return pht( | return pht( | ||||
'This object is public and can be viewed by anyone, even if they '. | 'This object is public and can be viewed by anyone, even if they '. | ||||
'do not have a Phabricator account.'); | 'do not have an account on this server.'); | ||||
case PhabricatorPolicies::POLICY_USER: | case PhabricatorPolicies::POLICY_USER: | ||||
return pht('Logged in users can take this action.'); | return pht('Logged in users can take this action.'); | ||||
case PhabricatorPolicies::POLICY_ADMIN: | case PhabricatorPolicies::POLICY_ADMIN: | ||||
return pht('Administrators can take this action.'); | return pht('Administrators can take this action.'); | ||||
case PhabricatorPolicies::POLICY_NOONE: | case PhabricatorPolicies::POLICY_NOONE: | ||||
return pht('By default, no one can take this action.'); | return pht('By default, no one can take this action.'); | ||||
default: | default: | ||||
$handle = id(new PhabricatorHandleQuery()) | $handle = id(new PhabricatorHandleQuery()) | ||||
▲ Show 20 Lines • Show All 255 Lines • Show Last 20 Lines |