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
caefbdc9
Commit
caefbdc9
authored
Feb 24, 2016
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(juser) 推送系统用户,选择密钥时不为用户生成密码
当推送系统用户时,选择系统用户使用密钥时没有必要为系统用户生成密码, 以免造成安全上的问题,在代码上也属于冗余.
parent
d4b1bdef
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
views.py
jperm/views.py
+2
-2
No files found.
jperm/views.py
View file @
caefbdc9
...
@@ -512,10 +512,10 @@ def perm_role_push(request):
...
@@ -512,10 +512,10 @@ def perm_role_push(request):
task
=
MyTask
(
push_resource
)
task
=
MyTask
(
push_resource
)
ret
=
{}
ret
=
{}
# 因为要先建立用户,
所以password 是必选项,
而push key是在 password也完成的情况下的 可选项
# 因为要先建立用户,而push key是在 password也完成的情况下的 可选项
# 1. 以秘钥 方式推送角色
# 1. 以秘钥 方式推送角色
if
key_push
:
if
key_push
:
ret
[
"pass_push"
]
=
task
.
add_user
(
role
.
name
,
CRYPTOR
.
decrypt
(
role
.
password
)
)
ret
[
"pass_push"
]
=
task
.
add_user
(
role
.
name
)
ret
[
"key_push"
]
=
task
.
push_key
(
role
.
name
,
os
.
path
.
join
(
role
.
key_path
,
'id_rsa.pub'
))
ret
[
"key_push"
]
=
task
.
push_key
(
role
.
name
,
os
.
path
.
join
(
role
.
key_path
,
'id_rsa.pub'
))
# 2. 推送账号密码
# 2. 推送账号密码
...
...
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