From ba8d0b5f469c8db5c90f8638a087865af73c2e5e Mon Sep 17 00:00:00 2001 From: Yang Luo Date: Sat, 7 Sep 2024 20:55:14 +0800 Subject: [PATCH] feat: Revert "feat: Users added through LDAP cannot log in using the set password" (#3186) This reverts commit 973a1df6c279218342fa086d8d28c756f59fe372. --- object/check.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/object/check.go b/object/check.go index 36defa0d..5200cf1f 100644 --- a/object/check.go +++ b/object/check.go @@ -354,8 +354,8 @@ func CheckUserPassword(organization string, username string, password string, la } } - if user.Ldap != "" && (isSigninViaLdap || user.Password == "") { - if !isPasswordWithLdapEnabled { + if user.Ldap != "" { + if !isSigninViaLdap && !isPasswordWithLdapEnabled { return nil, fmt.Errorf(i18n.Translate(lang, "check:password or code is incorrect")) }