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.
This commit is contained in:
Joey Hess 2014-05-30 14:17:20 -04:00
parent 9eaabf0382
commit 52601eb606

View file

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