Changeset View
Changeset View
Standalone View
Standalone View
src/applications/base/PhabricatorApplication.php
| Show First 20 Lines • Show All 484 Lines • ▼ Show 20 Lines | |||||
| /* -( Policies )----------------------------------------------------------- */ | /* -( Policies )----------------------------------------------------------- */ | ||||
| protected function getCustomCapabilities() { | protected function getCustomCapabilities() { | ||||
| return array(); | return array(); | ||||
| } | } | ||||
| final private function getCustomPolicySetting($capability) { | private function getCustomPolicySetting($capability) { | ||||
| if (!$this->isCapabilityEditable($capability)) { | if (!$this->isCapabilityEditable($capability)) { | ||||
| return null; | return null; | ||||
| } | } | ||||
| $policy_locked = PhabricatorEnv::getEnvConfig('policy.locked'); | $policy_locked = PhabricatorEnv::getEnvConfig('policy.locked'); | ||||
| if (isset($policy_locked[$capability])) { | if (isset($policy_locked[$capability])) { | ||||
| return $policy_locked[$capability]; | return $policy_locked[$capability]; | ||||
| } | } | ||||
| Show All 9 Lines | private function getCustomPolicySetting($capability) { | ||||
| if (!$policy) { | if (!$policy) { | ||||
| return null; | return null; | ||||
| } | } | ||||
| return idx($policy, $capability); | return idx($policy, $capability); | ||||
| } | } | ||||
| final private function getCustomCapabilitySpecification($capability) { | private function getCustomCapabilitySpecification($capability) { | ||||
| $custom = $this->getCustomCapabilities(); | $custom = $this->getCustomCapabilities(); | ||||
| if (!isset($custom[$capability])) { | if (!isset($custom[$capability])) { | ||||
| throw new Exception(pht("Unknown capability '%s'!", $capability)); | throw new Exception(pht("Unknown capability '%s'!", $capability)); | ||||
| } | } | ||||
| return $custom[$capability]; | return $custom[$capability]; | ||||
| } | } | ||||
| final public function getCapabilityLabel($capability) { | final public function getCapabilityLabel($capability) { | ||||
| ▲ Show 20 Lines • Show All 129 Lines • Show Last 20 Lines | |||||