mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 05:50:55 +01:00
Fix non-public capabilities in Application edit
Summary: Ref T603. I nuked this check by accident and neglected to test the negative case. Test Plan: Saved a non-public policy (Herald Global) and a public policy (Maniphest View). Reviewers: asherkin, btrahan Reviewed By: asherkin CC: aran Maniphest Tasks: T603 Differential Revision: https://secure.phabricator.com/D7278
This commit is contained in:
parent
e3005fad09
commit
c39b10aa7a
1 changed files with 7 additions and 4 deletions
|
@ -51,10 +51,13 @@ final class PhabricatorApplicationEditController
|
|||
continue;
|
||||
}
|
||||
|
||||
$capobj = PhabricatorPolicyCapability::getCapabilityByKey($capability);
|
||||
if (!$capobj || !$capobj->shouldAllowPublicPolicySetting()) {
|
||||
// Can't set non-public policies to public.
|
||||
continue;
|
||||
if ($new == PhabricatorPolicies::POLICY_PUBLIC) {
|
||||
$capobj = PhabricatorPolicyCapability::getCapabilityByKey(
|
||||
$capability);
|
||||
if (!$capobj || !$capobj->shouldAllowPublicPolicySetting()) {
|
||||
// Can't set non-public policies to public.
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$result[$capability] = $new;
|
||||
|
|
Loading…
Reference in a new issue