Changeset View
Changeset View
Standalone View
Standalone View
src/applications/policy/filter/PhabricatorPolicyFilter.php
Show First 20 Lines • Show All 375 Lines • ▼ Show 20 Lines | foreach ($groups as $structs) { | ||||
// We've already rejected this object, so we don't need to reject | // We've already rejected this object, so we don't need to reject | ||||
// it again. | // it again. | ||||
continue; | continue; | ||||
} | } | ||||
$reject = $extended_objects[$extended_key]; | $reject = $extended_objects[$extended_key]; | ||||
unset($extended_objects[$extended_key]); | unset($extended_objects[$extended_key]); | ||||
// TODO: This isn't as user-friendly as it could be. It's possible | // It's possible that we're rejecting this object for multiple | ||||
// that we're rejecting this object for multiple capability/policy | // capability/policy failures, but just pick the first one to show | ||||
// failures, though. | // to the user. | ||||
$this->rejectObject($reject, false, '<extended>'); | $first_capability = head($capabilities); | ||||
$first_policy = $object_in->getPolicy($first_capability); | |||||
$this->rejectObject($reject, $first_policy, $first_capability); | |||||
} | } | ||||
} | } | ||||
} | } | ||||
return $extended_objects; | return $extended_objects; | ||||
} | } | ||||
private function executeExtendedPolicyChecks( | private function executeExtendedPolicyChecks( | ||||
▲ Show 20 Lines • Show All 462 Lines • Show Last 20 Lines |