mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-30 01:10:58 +01:00
Reject objects with invalid policies instead of fataling
Summary: This is correct, but the root cause of the issue isn't very clear to me. Test Plan: Poked around various pages which filter objects. Reviewers: joshuaspence Reviewed By: joshuaspence Subscribers: epriestley Differential Revision: https://secure.phabricator.com/D11727
This commit is contained in:
parent
aaf8d73ec7
commit
767397ee14
1 changed files with 5 additions and 1 deletions
|
@ -411,7 +411,11 @@ final class PhabricatorPolicyFilter {
|
|||
$viewer = $this->viewer;
|
||||
$viewer_phid = $viewer->getPHID();
|
||||
|
||||
$policy = $this->customPolicies[$viewer_phid][$policy_phid];
|
||||
$policy = idx($this->customPolicies[$viewer_phid], $policy_phid);
|
||||
if (!$policy) {
|
||||
// Reject, this policy is bogus.
|
||||
return false;
|
||||
}
|
||||
|
||||
$objects = $policy->getRuleObjects();
|
||||
$action = null;
|
||||
|
|
Loading…
Reference in a new issue