mirror of
https://github.com/veops/cmdb.git
synced 2025-08-07 23:34:00 +08:00
[更新] 修复 LDAP 登录失败的问题 (#336)
Co-authored-by: sherlock <sherlock@gmail.com>
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user