mirror of https://github.com/jumpserver/jumpserver
[Update] 修改配置,默认先从数据库认证
parent
63f1ec839c
commit
7874a1539c
|
@ -118,7 +118,7 @@ class LDAPSettingForm(BaseForm):
|
|||
)
|
||||
AUTH_LDAP_SEARCH_FILTER = forms.CharField(
|
||||
label=_("User search filter"), initial='(cn=%(user)s)',
|
||||
help_text=_("User search filter must contain ([cn,uid,sAMAccountName,...]=%(user)s)")
|
||||
help_text=_("Choice may be (cn|uid|sAMAccountName)=%(user)s)")
|
||||
)
|
||||
AUTH_LDAP_USER_ATTR_MAP = DictField(
|
||||
label=_("User attr map"),
|
||||
|
|
|
@ -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.insert(0, settings.AUTH_LDAP_BACKEND)
|
||||
settings.AUTHENTICATION_BACKENDS.append(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)
|
||||
|
||||
|
|
Binary file not shown.
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: Jumpserver 0.3.3\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-03-14 18:11+0800\n"
|
||||
"POT-Creation-Date: 2018-03-14 19:07+0800\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: ibuler <ibuler@qq.com>\n"
|
||||
"Language-Team: Jumpserver team<ibuler@qq.com>\n"
|
||||
|
@ -1175,9 +1175,8 @@ msgid "User search filter"
|
|||
msgstr "用户过滤器"
|
||||
|
||||
#: common/forms.py:121
|
||||
#, python-format
|
||||
msgid "User search filter must contain ([cn,uid,sAMAccountName,...]=%(user)s)"
|
||||
msgstr "用户过滤器必须包含([cn,uid,sAMAccountName,...]=%(user)s)"
|
||||
msgid "Choice may be (cn|uid|sAMAccountName)=%(user)s)"
|
||||
msgstr "可能的选项是(cn或uid或sAMAccountName=%(user)s)"
|
||||
|
||||
#: common/forms.py:124
|
||||
msgid "User attr map"
|
||||
|
|
|
@ -332,7 +332,7 @@ AUTH_LDAP_ALWAYS_UPDATE_USER = True
|
|||
AUTH_LDAP_BACKEND = 'django_auth_ldap.backend.LDAPBackend'
|
||||
|
||||
if AUTH_LDAP:
|
||||
AUTHENTICATION_BACKENDS.insert(0, AUTH_LDAP_BACKEND)
|
||||
AUTHENTICATION_BACKENDS.append(AUTH_LDAP_BACKEND)
|
||||
|
||||
# Celery using redis as broker
|
||||
CELERY_BROKER_URL = 'redis://:%(password)s@%(host)s:%(port)s/3' % {
|
||||
|
|
Loading…
Reference in New Issue