mirror of
https://github.com/zylon-ai/private-gpt.git
synced 2025-12-22 23:22:57 +01:00
Updated with auth for ldap login
This commit is contained in:
parent
e2cae86945
commit
e307e73b03
1 changed files with 2 additions and 1 deletions
|
|
@ -127,7 +127,7 @@ def login_access_token(
|
|||
return True
|
||||
else:
|
||||
username, department = ldap_login(db=db, username=form_data.username, password=form_data.password)
|
||||
|
||||
return True
|
||||
else:
|
||||
username, department = ldap_login(db=db, username=form_data.username, password=form_data.password)
|
||||
depart = crud.department.get_by_department_name(db, name=department)
|
||||
|
|
@ -137,6 +137,7 @@ def login_access_token(
|
|||
ad_user_register(db=db, email=form_data.username, fullname=username, password=form_data.password, department_id=1)
|
||||
return True
|
||||
return False
|
||||
|
||||
if not (ad_auth(LDAP_ENABLE)):
|
||||
raise HTTPException(
|
||||
status_code=403,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue