Skip to content

Commit

Permalink
fix: admin login not use ldap
Browse files Browse the repository at this point in the history
  • Loading branch information
lihuacai168 authored Nov 29, 2023
1 parent 8314ee9 commit de1be0d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions FasterRunner/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,11 +345,13 @@
import ldap
from django_auth_ldap.config import LDAPSearch

AUTHENTICATION_BACKENDS = (
USE_LDAP = False # 如果需要开启LDAP认证,就设置位True

if USE_LDAP:
AUTHENTICATION_BACKENDS = (
'django_auth_ldap.backend.LDAPBackend',
)
)

USE_LDAP = False # 如果需要开启LDAP认证,就设置位True
AUTH_LDAP_SERVER_URI = "ldap://localhost:389" # LDAP服务器地址,默认端口389

AUTH_LDAP_BIND_DN = "cn=admin,dc=myorg,dc=com" # LDAP管理员账号
Expand Down

0 comments on commit de1be0d

Please sign in to comment.