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