[更新] 修复 LDAP 登录失败的问题

This commit is contained in:
sherlock
2023-12-24 21:43:48 +08:00
parent 3919dfdfbb
commit e74cc68f3c
2 changed files with 6 additions and 6 deletions

View File

@@ -39,7 +39,7 @@ class LoginView(APIView):
password = request.values.get("password")
_role = None
config = AuthenticateDataCRUD(AuthenticateType.LDAP).get()
if config.get('LDAP', {}).get('enabled') or config.get('LDAP', {}).get('enable'):
if config.get('enabled') or config.get('enable'):
from api.lib.perm.authentication.ldap import authenticate_with_ldap
user, authenticated = authenticate_with_ldap(username, password)
else: