Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
7874a153
Commit
7874a153
authored
Mar 14, 2018
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 修改配置,默认先从数据库认证
parent
63f1ec83
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
7 deletions
+6
-7
forms.py
apps/common/forms.py
+1
-1
models.py
apps/common/models.py
+1
-1
django.mo
apps/i18n/zh/LC_MESSAGES/django.mo
+0
-0
django.po
apps/i18n/zh/LC_MESSAGES/django.po
+3
-4
settings.py
apps/jumpserver/settings.py
+1
-1
No files found.
apps/common/forms.py
View file @
7874a153
...
...
@@ -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"
),
...
...
apps/common/models.py
View file @
7874a153
...
...
@@ -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
)
...
...
apps/i18n/zh/LC_MESSAGES/django.mo
View file @
7874a153
No preview for this file type
apps/i18n/zh/LC_MESSAGES/django.po
View file @
7874a153
...
...
@@ -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 1
8:11
+0800\n"
"POT-Creation-Date: 2018-03-14 1
9: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"
...
...
apps/jumpserver/settings.py
View file @
7874a153
...
...
@@ -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'
%
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment