3 final class ManiphestTaskAuthorPolicyRule
4 extends PhabricatorPolicyRule
{
6 public function getObjectPolicyKey() {
7 return 'maniphest.author';
10 public function getObjectPolicyName() {
11 return pht('Task Author');
14 public function getPolicyExplanation() {
15 return pht('The author of this task can take this action.');
18 public function getRuleDescription() {
19 return pht('task author');
22 public function canApplyToObject(PhabricatorPolicyInterface
$object) {
23 return ($object instanceof ManiphestTask
);
26 public function applyRule(
27 PhabricatorUser
$viewer,
29 PhabricatorPolicyInterface
$object) {
31 $viewer_phid = $viewer->getPHID();
36 return ($object->getAuthorPHID() == $viewer_phid);
39 public function getValueControlType() {
40 return self
::CONTROL_TYPE_NONE
;