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
96014760
Commit
96014760
authored
Sep 29, 2014
by
guanghongwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
maybe车次好了
parent
e2e06713
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
+8
-5
views.py
webroot/AutoSa/AutoSa/views.py
+3
-0
forms.py
webroot/AutoSa/UserManage/forms.py
+1
-1
chgUser.html
webroot/AutoSa/templates/chgUser.html
+4
-4
No files found.
webroot/AutoSa/AutoSa/views.py
View file @
96014760
...
@@ -509,6 +509,9 @@ def chgUser(request):
...
@@ -509,6 +509,9 @@ def chgUser(request):
if
''
in
[
username
,
password
,
key_pass
,
name
,
group_post
]:
if
''
in
[
username
,
password
,
key_pass
,
name
,
group_post
]:
error
=
u'带*内容不能为空'
error
=
u'带*内容不能为空'
if
len
(
password
)
<
6
or
len
(
key_pass
)
<
6
:
error
=
u'密码长度需>6'
u
=
User
.
objects
.
get
(
username
=
username
)
u
=
User
.
objects
.
get
(
username
=
username
)
chg_keypass
=
bash
(
'ssh-keygen -p -P
%
s -N
%
s -f
%
s'
%
(
jm
.
decrypt
(
u
.
key_pass
),
key_pass
,
keyfile
))
chg_keypass
=
bash
(
'ssh-keygen -p -P
%
s -N
%
s -f
%
s'
%
(
jm
.
decrypt
(
u
.
key_pass
),
key_pass
,
keyfile
))
...
...
webroot/AutoSa/UserManage/forms.py
View file @
96014760
...
@@ -18,7 +18,7 @@ class UserAddForm(forms.Form):
...
@@ -18,7 +18,7 @@ class UserAddForm(forms.Form):
password_again
=
forms
.
CharField
(
max_length
=
30
,
password_again
=
forms
.
CharField
(
max_length
=
30
,
widget
=
forms
.
PasswordInput
(
widget
=
forms
.
PasswordInput
(
attrs
=
{
'class'
:
'form-control'
,
'placeholder'
:
'确认密码'
}))
attrs
=
{
'class'
:
'form-control'
,
'placeholder'
:
'确认密码'
}))
key_pass
=
forms
.
CharField
(
max_length
=
30
,
key_pass
=
forms
.
CharField
(
max_length
=
30
,
min_length
=
6
,
widget
=
forms
.
PasswordInput
(
attrs
=
{
'class'
:
'form-control'
,
'placeholder'
:
'密钥密码'
}))
widget
=
forms
.
PasswordInput
(
attrs
=
{
'class'
:
'form-control'
,
'placeholder'
:
'密钥密码'
}))
key_pass_again
=
forms
.
CharField
(
max_length
=
30
,
key_pass_again
=
forms
.
CharField
(
max_length
=
30
,
widget
=
forms
.
PasswordInput
(
widget
=
forms
.
PasswordInput
(
...
...
webroot/AutoSa/templates/chgUser.html
View file @
96014760
...
@@ -39,15 +39,15 @@
...
@@ -39,15 +39,15 @@
</div>
</div>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
for=
"keypass"
class=
"col-sm-2 control-label"
>
密钥密码
<span
style=
"color: red"
>
*
</span></label>
<label
for=
"key
_
pass"
class=
"col-sm-2 control-label"
>
密钥密码
<span
style=
"color: red"
>
*
</span></label>
<div
class=
"col-sm-4"
>
<div
class=
"col-sm-4"
>
<input
type=
"password"
id=
"key
pass"
name=
"key
pass"
class=
"form-control"
value=
"{{ user.key_pass }}"
>
<input
type=
"password"
id=
"key
_pass"
name=
"key_
pass"
class=
"form-control"
value=
"{{ user.key_pass }}"
>
</div>
</div>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
for=
"keypass_again"
class=
"col-sm-2 control-label"
>
确认密码
<span
style=
"color: red"
>
*
</span></label>
<label
for=
"key
_
pass_again"
class=
"col-sm-2 control-label"
>
确认密码
<span
style=
"color: red"
>
*
</span></label>
<div
class=
"col-sm-4"
>
<div
class=
"col-sm-4"
>
<input
type=
"password"
id=
"key
pass_again"
name=
"key
pass_again"
class=
"form-control"
value=
"{{ user.key_pass }}"
>
<input
type=
"password"
id=
"key
_pass_again"
name=
"key_
pass_again"
class=
"form-control"
value=
"{{ user.key_pass }}"
>
</div>
</div>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
...
...
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