Skip to content

Commit

Permalink
Merge pull request #147 from lihuacai168:fix/admin-login
Browse files Browse the repository at this point in the history
fix: admin login not use ldap
  • Loading branch information
lihuacai168 authored Nov 29, 2023
2 parents 8314ee9 + de1be0d commit 9a266b3
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 9a266b3

Please sign in to comment.