Changeset View
Changeset View
Standalone View
Standalone View
src/applications/policy/query/PhabricatorPolicyQuery.php
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | final class PhabricatorPolicyQuery | ||||
public static function renderPolicyDescriptions( | public static function renderPolicyDescriptions( | ||||
PhabricatorUser $viewer, | PhabricatorUser $viewer, | ||||
PhabricatorPolicyInterface $object) { | PhabricatorPolicyInterface $object) { | ||||
$policies = self::loadPolicies($viewer, $object); | $policies = self::loadPolicies($viewer, $object); | ||||
foreach ($policies as $capability => $policy) { | foreach ($policies as $capability => $policy) { | ||||
$policies[$capability] = $policy->renderDescription(); | $policies[$capability] = $policy->newRef($viewer) | ||||
->newCapabilityLink($object, $capability); | |||||
} | } | ||||
return $policies; | return $policies; | ||||
} | } | ||||
protected function loadPage() { | protected function loadPage() { | ||||
if ($this->object && $this->phids) { | if ($this->object && $this->phids) { | ||||
throw new Exception( | throw new Exception( | ||||
▲ Show 20 Lines • Show All 368 Lines • Show Last 20 Lines |