From 3a91e648975cb69761d92c1c72ca6ca06c393daf Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 14 Oct 2015 08:15:14 -0700 Subject: [PATCH] Preserve "Space" UI control value when editing Passphrase credentials Summary: Fixes T9568. We just weren't setting this properly so it would default away from the proper value. Test Plan: - Edited a credential in a non-default space, edit form populated properly. - Changed "Space", introduced an error, saved form, got error with sticky value for "Space" properly. - Saved form with new space value. - Created a new credential. Reviewers: chad Reviewed By: chad Subscribers: revi Maniphest Tasks: T9568 Differential Revision: https://secure.phabricator.com/D14278 --- .../passphrase/controller/PassphraseCredentialEditController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/applications/passphrase/controller/PassphraseCredentialEditController.php b/src/applications/passphrase/controller/PassphraseCredentialEditController.php index 89fe783fac..a749e82af3 100644 --- a/src/applications/passphrase/controller/PassphraseCredentialEditController.php +++ b/src/applications/passphrase/controller/PassphraseCredentialEditController.php @@ -249,6 +249,7 @@ final class PassphraseCredentialEditController extends PassphraseController { id(new AphrontFormPolicyControl()) ->setName('viewPolicy') ->setPolicyObject($credential) + ->setSpacePHID($v_space) ->setCapability(PhabricatorPolicyCapability::CAN_VIEW) ->setPolicies($policies)) ->appendControl(