summaryrefslogtreecommitdiff
path: root/views.go
diff options
context:
space:
mode:
authorMarkus Krogh <markus@nordu.net>2019-02-07 13:39:06 +0100
committerMarkus Krogh <markus@nordu.net>2019-02-07 13:39:06 +0100
commitee7e9422674f449fd8571c8d359afbe862fa6676 (patch)
treed2f2ab07c06d8d63913a8752fb4b9d7fe6357294 /views.go
parent7f437db53b49339615bbad9813e8beee522de493 (diff)
Set sasl password for SSO as well
Diffstat (limited to 'views.go')
-rw-r--r--views.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/views.go b/views.go
index 1f63036..70b84c6 100644
--- a/views.go
+++ b/views.go
@@ -90,6 +90,15 @@ func (v *views) ChangePassword(what string) http.Handler {
}
log.Println("AUDIT", "Changed", what, "password for", username)
+ if strings.ToUpper(what) == "SSO" {
+ // We need to make sure ldap password is set to sasl as well
+ err = pwman.LdapInfo.SetSASLPassword(username)
+ if err != nil {
+ redirectSameFlash(w, req, err.Error(), "error")
+ return
+ }
+ }
+
redirectSameFlash(w, req, fmt.Sprintf("Password %s successfully updated", what), "success")
}
})