Page MenuHomePhorge

ManiphestTaskAuthorPolicyRule.php
No OneTemporary

Size
635 B
Referenced Files
None
Subscribers
None

ManiphestTaskAuthorPolicyRule.php

<?php
final class ManiphestTaskAuthorPolicyRule
extends PhabricatorPolicyRule {
public function getRuleDescription() {
return pht('task author');
}
public function canApplyToObject(PhabricatorPolicyInterface $object) {
return ($object instanceof ManiphestTask);
}
public function applyRule(
PhabricatorUser $viewer,
$value,
PhabricatorPolicyInterface $object) {
$viewer_phid = $viewer->getPHID();
if (!$viewer_phid) {
return false;
}
return ($object->getAuthorPHID() == $viewer_phid);
}
public function getValueControlType() {
return self::CONTROL_TYPE_NONE;
}
}

File Metadata

Mime Type
text/x-php
Expires
Sun, Jun 29, 11:17 PM (1 d, 23 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
266248
Default Alt Text
ManiphestTaskAuthorPolicyRule.php (635 B)

Event Timeline