Check policy.locked slightly sooner in PhabricatorApplication
Summary: We could still miss this if the policy had never been customized and we returned early after one of the other checks.
Test Plan:
Works great on instances now.
{F267067}
Reviewers: btrahan
Reviewed By: btrahan
Subscribers: epriestley
Differential Revision: https://secure.phabricator.com/D11374
This commit is contained in:
@@ -442,6 +442,11 @@ abstract class PhabricatorApplication implements PhabricatorPolicyInterface {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$policy_locked = PhabricatorEnv::getEnvConfig('policy.locked');
|
||||||
|
if (isset($policy_locked[$capability])) {
|
||||||
|
return $policy_locked[$capability];
|
||||||
|
}
|
||||||
|
|
||||||
$config = PhabricatorEnv::getEnvConfig('phabricator.application-settings');
|
$config = PhabricatorEnv::getEnvConfig('phabricator.application-settings');
|
||||||
|
|
||||||
$app = idx($config, $this->getPHID());
|
$app = idx($config, $this->getPHID());
|
||||||
@@ -454,11 +459,6 @@ abstract class PhabricatorApplication implements PhabricatorPolicyInterface {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$policy_locked = PhabricatorEnv::getEnvConfig('policy.locked');
|
|
||||||
if (isset($policy_locked[$capability])) {
|
|
||||||
return $policy_locked[$capability];
|
|
||||||
}
|
|
||||||
|
|
||||||
return idx($policy, $capability);
|
return idx($policy, $capability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user