From 382f5d959bef86455a5dc84f8e10fe95a9578492 Mon Sep 17 00:00:00 2001 From: Filip Gralinski Date: Mon, 14 Mar 2016 21:12:54 +0100 Subject: [PATCH] info on keys --- Handler/YourAccount.hs | 5 ++++- templates/your-account.hamlet | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Handler/YourAccount.hs b/Handler/YourAccount.hs index 84d2d93..d94c75a 100644 --- a/Handler/YourAccount.hs +++ b/Handler/YourAccount.hs @@ -77,13 +77,16 @@ updateLocalIdAndPubKey userId (Just localId) maybeSshPubKey = do case userLocalId user of Just prevLocalId -> do unless (prevLocalId == localId) $ setMessage $ toHtml ("only the administrator can change your ID" :: Text) - Nothing -> runDB $ update userId [UserLocalId =. Just localId] + Nothing -> do + runDB $ update userId [UserLocalId =. Just localId] + setMessage $ toHtml ("ID set" :: Text) runDB $ deleteWhere [PublicKeyUser ==. userId] case maybeSshPubKey of Just key -> do runDB $ insert $ PublicKey { publicKeyUser=userId, publicKeyPubkey=key } + setMessage $ toHtml ("SSH public key added; now it may take 10 minutes for the keys to be active, please be patient" :: Text) return () Nothing -> return () else diff --git a/templates/your-account.hamlet b/templates/your-account.hamlet index df0a208..e363350 100644 --- a/templates/your-account.hamlet +++ b/templates/your-account.hamlet @@ -10,6 +10,6 @@