Changeset View
Changeset View
Standalone View
Standalone View
src/applications/maniphest/policy/ManiphestTaskPolicyCodex.php
Show All 36 Lines | final class ManiphestTaskPolicyCodex | ||||
public function getPolicySpecialRuleDescriptions() { | public function getPolicySpecialRuleDescriptions() { | ||||
$object = $this->getObject(); | $object = $this->getObject(); | ||||
$rules = array(); | $rules = array(); | ||||
$rules[] = $this->newRule() | $rules[] = $this->newRule() | ||||
->setCapabilities( | ->setCapabilities( | ||||
array( | array( | ||||
PhabricatorPolicyCapability::CAN_VIEW, | |||||
PhabricatorPolicyCapability::CAN_EDIT, | |||||
)) | |||||
->setDescription( | |||||
pht('The owner of a task can always view and edit it.')); | |||||
$rules[] = $this->newRule() | |||||
->setCapabilities( | |||||
array( | |||||
PhabricatorPolicyCapability::CAN_EDIT, | PhabricatorPolicyCapability::CAN_EDIT, | ||||
)) | )) | ||||
->setIsActive($object->areEditsLocked()) | ->setIsActive($object->areEditsLocked()) | ||||
->setDescription( | ->setDescription( | ||||
pht( | pht( | ||||
'Tasks with edits locked may only be edited by their owner.')); | 'Tasks with edits locked may only be edited by their owner.')); | ||||
return $rules; | return $rules; | ||||
Show All 18 Lines |