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
21a72025
Commit
21a72025
authored
Feb 01, 2018
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bugfix] 修复ldap认证bug
parent
02cd3b1a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
3 deletions
+6
-3
forms.py
apps/assets/forms.py
+1
-1
forms.py
apps/common/forms.py
+5
-2
django.mo
apps/i18n/zh/LC_MESSAGES/django.mo
+0
-0
django.po
apps/i18n/zh/LC_MESSAGES/django.po
+0
-0
No files found.
apps/assets/forms.py
View file @
21a72025
...
...
@@ -127,7 +127,7 @@ class AssetBulkUpdateForm(forms.ModelForm):
attrs
=
{
'class'
:
'select2'
,
'data-placeholder'
:
_
(
'Select asset groups'
)}
),
'labels'
:
forms
.
SelectMultiple
(
attrs
=
{
'class'
:
'select2'
,
'data-placeholder'
:
_
(
'Select lab
le
s'
)}
attrs
=
{
'class'
:
'select2'
,
'data-placeholder'
:
_
(
'Select lab
el
s'
)}
),
}
...
...
apps/common/forms.py
View file @
21a72025
...
...
@@ -117,7 +117,8 @@ class LDAPSettingForm(BaseForm):
label
=
_
(
"User OU"
),
initial
=
'ou=tech,dc=jumpserver,dc=org'
)
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)"
)
)
AUTH_LDAP_USER_ATTR_MAP
=
DictField
(
label
=
_
(
"User attr map"
),
...
...
@@ -125,13 +126,15 @@ class LDAPSettingForm(BaseForm):
"username"
:
"cn"
,
"name"
:
"sn"
,
"email"
:
"mail"
})
}),
help_text
=
_
(
"User attr map present how to map LDAP user attr to jumpserver, username,name,email is jumpserver attr"
)
)
# AUTH_LDAP_GROUP_SEARCH_OU = CONFIG.AUTH_LDAP_GROUP_SEARCH_OU
# AUTH_LDAP_GROUP_SEARCH_FILTER = CONFIG.AUTH_LDAP_GROUP_SEARCH_FILTER
AUTH_LDAP_START_TLS
=
forms
.
BooleanField
(
label
=
_
(
"Use SSL"
),
initial
=
False
,
required
=
False
)
AUTH_LDAP
=
forms
.
BooleanField
(
label
=
_
(
"Enable LDAP auth"
),
initial
=
False
)
class
TerminalSettingForm
(
BaseForm
):
...
...
apps/i18n/zh/LC_MESSAGES/django.mo
View file @
21a72025
No preview for this file type
apps/i18n/zh/LC_MESSAGES/django.po
View file @
21a72025
This diff is collapsed.
Click to expand it.
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