3 final class PhabricatorUsersPolicyRule
extends PhabricatorPolicyRule
{
5 public function getRuleDescription() {
9 public function applyRule(
10 PhabricatorUser
$viewer,
12 PhabricatorPolicyInterface
$object) {
14 foreach ($value as $phid) {
15 if ($phid == $viewer->getPHID()) {
23 public function getValueControlType() {
24 return self
::CONTROL_TYPE_TOKENIZER
;
27 public function getValueControlTemplate() {
28 return $this->getDatasourceTemplate(new PhabricatorPeopleDatasource());
31 public function getRuleOrder() {
35 public function getValueForStorage($value) {
36 PhutilTypeSpec
::newFromString('list<string>')->check($value);
37 return array_values($value);
40 public function getValueForDisplay(PhabricatorUser
$viewer, $value) {
45 $handles = id(new PhabricatorHandleQuery())
50 return mpull($handles, 'getFullName', 'getPHID');
53 public function ruleHasEffect($value) {