mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$capobj = PhabricatorPolicyCapability::getCapabilityByKey($capability);
|
if ($new == PhabricatorPolicies::POLICY_PUBLIC) {
|
||||||
if (!$capobj || !$capobj->shouldAllowPublicPolicySetting()) {
|
$capobj = PhabricatorPolicyCapability::getCapabilityByKey(
|
||||||
// Can't set non-public policies to public.
|
$capability);
|
||||||
continue;
|
if (!$capobj || !$capobj->shouldAllowPublicPolicySetting()) {
|
||||||
|
// Can't set non-public policies to public.
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$result[$capability] = $new;
|
$result[$capability] = $new;
|
||||||
|
|
Loading…
Reference in a new issue