From d43d7d1ae991657e74a6f8be8dfe7782de97e243 Mon Sep 17 00:00:00 2001 From: Yixiang Zhao Date: Sat, 12 Mar 2022 21:06:38 +0800 Subject: [PATCH] feat: support master password for ldap user (#561) Signed-off-by: Yixiang Zhao --- object/check.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/object/check.go b/object/check.go index 114acf4d..69033fea 100644 --- a/object/check.go +++ b/object/check.go @@ -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 }