From 39d19c33ec9c5819ab4330e8ac203ef1a06db723 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Fri, 18 Aug 2017 09:19:31 -0700 Subject: [PATCH] Redirect users back to where they added an SSH Key Summary: Ref T12964. This feels like a cheat, but works well. Just redirect the user back to the form they came from instead of to the key page. Test Plan: Add a key to a user profile, add a key to an Alamanac device. Grep for PhabricatorAuthSSHKeyTableView and check all locations. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Maniphest Tasks: T12964 Differential Revision: https://secure.phabricator.com/D18445 --- .../auth/controller/PhabricatorAuthSSHKeyEditController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/auth/controller/PhabricatorAuthSSHKeyEditController.php b/src/applications/auth/controller/PhabricatorAuthSSHKeyEditController.php index 1023b0cd75..6dfc957f48 100644 --- a/src/applications/auth/controller/PhabricatorAuthSSHKeyEditController.php +++ b/src/applications/auth/controller/PhabricatorAuthSSHKeyEditController.php @@ -93,7 +93,7 @@ final class PhabricatorAuthSSHKeyEditController try { $editor->applyTransactions($key, $xactions); - return id(new AphrontRedirectResponse())->setURI($key->getURI()); + return id(new AphrontRedirectResponse())->setURI($cancel_uri); } catch (PhabricatorApplicationTransactionValidationException $ex) { $validation_exception = $ex; $e_name = $ex->getShortMessage($type_name);