From 753917c10c4e95e527c110d5e4df28eb450cf133 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 6 Nov 2013 16:05:54 +0600 Subject: [PATCH] Revert changes in AphrontFormPolicyControl.php After recent Brecht's commit they're not needed. Euh, didn't notice policies could be edited in configuration :( --- src/view/form/control/AphrontFormPolicyControl.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/view/form/control/AphrontFormPolicyControl.php b/src/view/form/control/AphrontFormPolicyControl.php index f6e0196cf4..a9acdde028 100644 --- a/src/view/form/control/AphrontFormPolicyControl.php +++ b/src/view/form/control/AphrontFormPolicyControl.php @@ -118,13 +118,10 @@ final class AphrontFormPolicyControl extends AphrontFormControl { throw new Exception(pht("Call setCapability() before rendering!")); } - if (!$this->getValue()) { - $policy = $this->object->getPolicy($this->capability); - if (!$policy) { - // TODO: Make this configurable. - $policy = PhabricatorPolicies::POLICY_USER; - } - $this->setValue($policy); + $policy = $this->object->getPolicy($this->capability); + if (!$policy) { + // TODO: Make this configurable. + $policy = PhabricatorPolicies::POLICY_USER; }