mirror of https://github.com/jumpserver/jumpserver
[Update] 还原ldap配置
parent
7874a1539c
commit
15427fb743
|
@ -67,7 +67,7 @@ class Setting(models.Model):
|
|||
|
||||
if self.name == "AUTH_LDAP":
|
||||
if self.cleaned_value and settings.AUTH_LDAP_BACKEND not in settings.AUTHENTICATION_BACKENDS:
|
||||
settings.AUTHENTICATION_BACKENDS.append(settings.AUTH_LDAP_BACKEND)
|
||||
settings.AUTHENTICATION_BACKENDS.insert(0, settings.AUTH_LDAP_BACKEND)
|
||||
elif not self.cleaned_value and settings.AUTH_LDAP_BACKEND in settings.AUTHENTICATION_BACKENDS:
|
||||
settings.AUTHENTICATION_BACKENDS.remove(settings.AUTH_LDAP_BACKEND)
|
||||
|
||||
|
|
|
@ -332,7 +332,7 @@ AUTH_LDAP_ALWAYS_UPDATE_USER = True
|
|||
AUTH_LDAP_BACKEND = 'django_auth_ldap.backend.LDAPBackend'
|
||||
|
||||
if AUTH_LDAP:
|
||||
AUTHENTICATION_BACKENDS.append(AUTH_LDAP_BACKEND)
|
||||
AUTHENTICATION_BACKENDS.insert(0, AUTH_LDAP_BACKEND)
|
||||
|
||||
# Celery using redis as broker
|
||||
CELERY_BROKER_URL = 'redis://:%(password)s@%(host)s:%(port)s/3' % {
|
||||
|
|
Loading…
Reference in New Issue