From 52601eb6067037e197b5c0b56c257482d968b465 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 30 May 2014 14:17:20 -0400 Subject: [PATCH] don't show edit form after enabling ssh remote Just after enabing a ssh remote, we've not synced with it yet, so its description and group are not known. So, avoid showing edit form so user doesn't see blank info. Instead, redirect to dashboard. --- Assistant/WebApp/Configurators/Ssh.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Assistant/WebApp/Configurators/Ssh.hs b/Assistant/WebApp/Configurators/Ssh.hs index 420c973332..095d83f8a3 100644 --- a/Assistant/WebApp/Configurators/Ssh.hs +++ b/Assistant/WebApp/Configurators/Ssh.hs @@ -550,7 +550,9 @@ makeSshRepoConnection rs mk setup = setupRemote postsetup mgroup Nothing mk postsetup r = do liftAssistant $ sendRemoteControl RELOAD liftAnnex $ setup r - redirect $ EditNewRepositoryR (Remote.uuid r) + case rs of + NewRepo -> redirect $ EditNewRepositoryR (Remote.uuid r) + ExistingRepo -> redirect DashboardR makeGCryptRepo :: RepoStatus -> KeyId -> SshData -> Handler Html makeGCryptRepo rs keyid sshdata = makeSshRepoConnection rs mk (const noop)