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
a1862d91
Commit
a1862d91
authored
Mar 25, 2016
by
liuzheng712
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of github.com:jumpserver/jumpserver into TermLogRecorder
parents
860c7f15
4f79e909
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
12 deletions
+7
-12
user_api.py
juser/user_api.py
+5
-5
views.py
juser/views.py
+1
-6
web_terminal.html
templates/jlog/web_terminal.html
+1
-1
No files found.
juser/user_api.py
View file @
a1862d91
...
...
@@ -87,12 +87,12 @@ def db_update_user(**kwargs):
admin_groups_post
=
kwargs
.
pop
(
'admin_groups'
)
user_id
=
kwargs
.
pop
(
'user_id'
)
user
=
User
.
objects
.
filter
(
id
=
user_id
)
user_get
=
User
.
objects
.
get
(
id
=
user_id
)
if
user
:
pwd
=
kwargs
.
pop
(
'password'
)
user_get
=
user
[
0
]
password
=
kwargs
.
pop
(
'password'
)
user
.
update
(
**
kwargs
)
if
p
wd
!=
''
:
user_get
.
set_password
(
p
w
d
)
if
p
assword
.
strip
()
:
user_get
.
set_password
(
p
asswor
d
)
user_get
.
save
()
else
:
return
None
...
...
@@ -180,7 +180,7 @@ def server_del_user(username):
delete a user from jumpserver linux system
删除系统上的某用户
"""
bash
(
'userdel -r
%
s'
%
username
)
bash
(
'userdel -r
-f
%
s'
%
username
)
def
get_display_msg
(
user
,
password
=
''
,
ssh_key_pwd
=
''
,
send_mail_need
=
False
):
...
...
juser/views.py
View file @
a1862d91
...
...
@@ -368,11 +368,6 @@ def user_edit(request):
else
:
return
HttpResponseRedirect
(
reverse
(
'user_list'
))
if
password
!=
''
:
password_decode
=
password
else
:
password_decode
=
None
db_update_user
(
user_id
=
user_id
,
password
=
password
,
name
=
name
,
...
...
@@ -391,7 +386,7 @@ def user_edit(request):
密码:
%
s (如果密码为None代表密码为原密码)
权限::
%
s
"""
%
(
user
.
name
,
URL
,
user
.
username
,
password
_decode
,
user_role
.
get
(
role_post
,
u''
))
"""
%
(
user
.
name
,
URL
,
user
.
username
,
password
,
user_role
.
get
(
role_post
,
u''
))
send_mail
(
'您的信息已修改'
,
msg
,
MAIL_FROM
,
[
email
],
fail_silently
=
False
)
return
HttpResponseRedirect
(
reverse
(
'user_list'
))
...
...
templates/jlog/web_terminal.html
View file @
a1862d91
...
...
@@ -11,7 +11,7 @@
.terminal
{
border
:
#000
solid
5px
;
font-family
:
"Monaco"
,
"DejaVu Sans Mono"
,
"Liberation Mono"
,
monospace
;
font-family
:
"Monaco"
,
"
Microsoft Yahei"
,
"
DejaVu Sans Mono"
,
"Liberation Mono"
,
monospace
;
font-size
:
11px
;
color
:
#f0f0f0
;
background
:
#000
;
...
...
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