summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Krogh <markus@nordu.net>2018-06-08 08:06:36 +0200
committerMarkus Krogh <markus@nordu.net>2018-06-08 08:06:36 +0200
commite3a4f7b7bd5e05595fc0c6cfd68afc4fd49384ee (patch)
tree4bd2a83c03b316a5c48cb0663ed9cdb56d1f39b5
parentfc2455cdbf8c64c98a8f7104ae7e7acdcff1337c (diff)
Audit logging for changepw and sshkeys
-rw-r--r--views.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/views.go b/views.go
index 7a15739..6bc915f 100644
--- a/views.go
+++ b/views.go
@@ -84,6 +84,7 @@ func (v *views) ChangePassword(what string) http.Handler {
redirectSameFlash(w, req, err.Error(), "error")
return
}
+ log.Println("AUDIT", "Changed", what, "password for", username)
redirectSameFlash(w, req, fmt.Sprintf("Password %s successfully updated", what), "success")
}
@@ -148,6 +149,7 @@ func (v *views) ChangeSSHKeys() http.Handler {
log.Println("ERROR", err)
SetFlashMessage(w, err.Error(), "error")
} else {
+ log.Println("AUDIT", "Added new ssh key for", user.UserName)
SetFlashMessage(w, "Successfully added ssh key", "success")
}