feat: support master password for ldap user (#561)

Signed-off-by: Yixiang Zhao <seriouszyx@foxmail.com>
This commit is contained in:
Yixiang Zhao 2022-03-12 21:06:38 +08:00 committed by GitHub
parent c906f1e5d2
commit d43d7d1ae9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -179,13 +179,14 @@ func CheckUserPassword(organization string, username string, password string) (*
if user.IsForbidden {
return nil, "the user is forbidden to sign in, please contact the administrator"
}
//for ldap users
if user.Ldap != "" {
return checkLdapUserPassword(user, password)
}
msg := CheckPassword(user, password)
if msg != "" {
//for ldap users
if user.Ldap != "" {
return checkLdapUserPassword(user, password)
}
return nil, msg
}