mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-30 18:52:42 +01:00
30 lines
568 B
PHP
30 lines
568 B
PHP
|
<?php
|
||
|
|
||
|
final class PhabricatorProjectsAllPolicyRule
|
||
|
extends PhabricatorProjectsBasePolicyRule {
|
||
|
|
||
|
public function getRuleDescription() {
|
||
|
return pht('members of all projects');
|
||
|
}
|
||
|
|
||
|
public function applyRule(
|
||
|
PhabricatorUser $viewer,
|
||
|
$value,
|
||
|
PhabricatorPolicyInterface $object) {
|
||
|
|
||
|
$memberships = $this->getMemberships($viewer->getPHID());
|
||
|
foreach ($value as $project_phid) {
|
||
|
if (empty($memberships[$project_phid])) {
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
public function getRuleOrder() {
|
||
|
return 205;
|
||
|
}
|
||
|
|
||
|
}
|