Differential D13589 Diff 33531 src/applications/policy/controller/PhabricatorPolicyEditController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/policy/controller/PhabricatorPolicyEditController.php
| Show All 31 Lines | if ($object_phid) { | ||||
| } | } | ||||
| } | } | ||||
| $action_options = array( | $action_options = array( | ||||
| PhabricatorPolicy::ACTION_ALLOW => pht('Allow'), | PhabricatorPolicy::ACTION_ALLOW => pht('Allow'), | ||||
| PhabricatorPolicy::ACTION_DENY => pht('Deny'), | PhabricatorPolicy::ACTION_DENY => pht('Deny'), | ||||
| ); | ); | ||||
| $rules = id(new PhutilSymbolLoader()) | $rules = id(new PhutilClassMapQuery()) | ||||
| ->setAncestorClass('PhabricatorPolicyRule') | ->setAncestorClass('PhabricatorPolicyRule') | ||||
| ->loadObjects(); | ->execute(); | ||||
| foreach ($rules as $key => $rule) { | foreach ($rules as $key => $rule) { | ||||
| if (!$rule->canApplyToObject($object)) { | if (!$rule->canApplyToObject($object)) { | ||||
| unset($rules[$key]); | unset($rules[$key]); | ||||
| } | } | ||||
| } | } | ||||
| $rules = msort($rules, 'getRuleOrder'); | $rules = msort($rules, 'getRuleOrder'); | ||||
| ▲ Show 20 Lines • Show All 206 Lines • Show Last 20 Lines | |||||