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
fc58906b
Commit
fc58906b
authored
Nov 11, 2019
by
BaiJiangJie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 修改翻译信息
parent
e0d7a0e2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
django.mo
apps/locale/zh/LC_MESSAGES/django.mo
+0
-0
django.po
apps/locale/zh/LC_MESSAGES/django.po
+0
-0
api.py
apps/settings/api.py
+3
-3
No files found.
apps/locale/zh/LC_MESSAGES/django.mo
View file @
fc58906b
No preview for this file type
apps/locale/zh/LC_MESSAGES/django.po
View file @
fc58906b
This diff is collapsed.
Click to expand it.
apps/settings/api.py
View file @
fc58906b
...
@@ -104,7 +104,7 @@ class LDAPTestingAPI(APIView):
...
@@ -104,7 +104,7 @@ class LDAPTestingAPI(APIView):
try
:
try
:
json
.
loads
(
attr_map
)
json
.
loads
(
attr_map
)
except
json
.
JSONDecodeError
:
except
json
.
JSONDecodeError
:
return
Response
({
"error"
:
"AUTH_LDAP_USER_ATTR_MAP not valid"
},
status
=
401
)
return
Response
({
"error"
:
_
(
"LDAP attr map not valid"
)
},
status
=
401
)
config
=
self
.
get_ldap_config
(
serializer
)
config
=
self
.
get_ldap_config
(
serializer
)
util
=
LDAPServerUtil
(
config
=
config
)
util
=
LDAPServerUtil
(
config
=
config
)
...
@@ -221,14 +221,14 @@ class LDAPUserImportAPI(APIView):
...
@@ -221,14 +221,14 @@ class LDAPUserImportAPI(APIView):
return
Response
({
'error'
:
str
(
e
)},
status
=
401
)
return
Response
({
'error'
:
str
(
e
)},
status
=
401
)
if
users
is
None
:
if
users
is
None
:
return
Response
({
'msg'
:
'Get ldap users is None'
},
status
=
401
)
return
Response
({
'msg'
:
_
(
'Get ldap users is None'
)
},
status
=
401
)
errors
=
LDAPImportUtil
()
.
perform_import
(
users
)
errors
=
LDAPImportUtil
()
.
perform_import
(
users
)
if
errors
:
if
errors
:
return
Response
({
'errors'
:
errors
},
status
=
401
)
return
Response
({
'errors'
:
errors
},
status
=
401
)
count
=
users
if
users
is
None
else
len
(
users
)
count
=
users
if
users
is
None
else
len
(
users
)
return
Response
({
'msg'
:
'Imported {} users successfully'
.
format
(
count
)})
return
Response
({
'msg'
:
_
(
'Imported {} users successfully'
)
.
format
(
count
)})
class
LDAPCacheRefreshAPI
(
generics
.
RetrieveAPIView
):
class
LDAPCacheRefreshAPI
(
generics
.
RetrieveAPIView
):
...
...
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