mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 10:45:47 +08:00
feat: support master password for ldap user (#561)
Signed-off-by: Yixiang Zhao <seriouszyx@foxmail.com>
This commit is contained in:
parent
c906f1e5d2
commit
d43d7d1ae9
@ -179,13 +179,14 @@ func CheckUserPassword(organization string, username string, password string) (*
|
|||||||
if user.IsForbidden {
|
if user.IsForbidden {
|
||||||
return nil, "the user is forbidden to sign in, please contact the administrator"
|
return nil, "the user is forbidden to sign in, please contact the administrator"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
msg := CheckPassword(user, password)
|
||||||
|
if msg != "" {
|
||||||
//for ldap users
|
//for ldap users
|
||||||
if user.Ldap != "" {
|
if user.Ldap != "" {
|
||||||
return checkLdapUserPassword(user, password)
|
return checkLdapUserPassword(user, password)
|
||||||
}
|
}
|
||||||
|
|
||||||
msg := CheckPassword(user, password)
|
|
||||||
if msg != "" {
|
|
||||||
return nil, msg
|
return nil, msg
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user