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
dbc471c1
Commit
dbc471c1
authored
Jun 08, 2018
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bugfix] 修复小错误
parent
4c8eb4a9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
inventory.py
apps/ops/inventory.py
+1
-1
user.py
apps/users/views/user.py
+8
-7
No files found.
apps/ops/inventory.py
View file @
dbc471c1
...
...
@@ -98,7 +98,7 @@ class JMSInventory(BaseInventory):
if
gateway
.
private_key
:
proxy_command_list
.
append
(
"-i {}"
.
format
(
gateway
.
private_key_file
))
proxy_command
=
"'-o ProxyCommand={}"
.
format
(
proxy_command
=
"'-o ProxyCommand={}
'
"
.
format
(
" "
.
join
(
proxy_command_list
)
)
return
{
"ansible_ssh_common_args"
:
proxy_command
}
apps/users/views/user.py
View file @
dbc471c1
...
...
@@ -109,14 +109,15 @@ class UserUpdateView(AdminUserRequiredMixin, SuccessMessageMixin, UpdateView):
def
form_valid
(
self
,
form
):
password
=
form
.
cleaned_data
.
get
(
'password'
)
if
password
:
is_ok
=
check_password_rules
(
password
)
if
not
is_ok
:
form
.
add_error
(
"password"
,
_
(
"* Your password does not meet the requirements"
)
)
return
self
.
form_invalid
(
form
)
if
not
password
:
return
super
()
.
form_valid
(
form
)
is_ok
=
check_password_rules
(
password
)
if
not
is_ok
:
form
.
add_error
(
"password"
,
_
(
"* Your password does not meet the requirements"
)
)
return
self
.
form_invalid
(
form
)
return
super
()
.
form_valid
(
form
)
...
...
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