1
0
Fork 0
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:
epriestley 2013-10-09 16:23:36 -07:00
parent e3005fad09
commit c39b10aa7a

View file

@ -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;