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
2cb5876d
Unverified
Commit
2cb5876d
authored
Jul 17, 2018
by
老广
Committed by
GitHub
Jul 17, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into dev
parents
8883e009
91b3b7ce
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
2 deletions
+8
-2
api.py
apps/perms/api.py
+4
-0
asset_permission_list.html
apps/perms/templates/perms/asset_permission_list.html
+1
-1
api.py
apps/terminal/api.py
+2
-0
step_by_step.rst
docs/step_by_step.rst
+1
-1
No files found.
apps/perms/api.py
View file @
2cb5876d
...
@@ -5,6 +5,7 @@ from django.shortcuts import get_object_or_404
...
@@ -5,6 +5,7 @@ from django.shortcuts import get_object_or_404
from
rest_framework.views
import
APIView
,
Response
from
rest_framework.views
import
APIView
,
Response
from
rest_framework.generics
import
ListAPIView
,
get_object_or_404
,
RetrieveUpdateAPIView
from
rest_framework.generics
import
ListAPIView
,
get_object_or_404
,
RetrieveUpdateAPIView
from
rest_framework
import
viewsets
from
rest_framework
import
viewsets
from
rest_framework.pagination
import
LimitOffsetPagination
from
common.utils
import
set_or_append_attr_bulk
,
get_object_or_none
from
common.utils
import
set_or_append_attr_bulk
,
get_object_or_none
from
users.permissions
import
IsValidUser
,
IsSuperUser
,
IsSuperUserOrAppUser
from
users.permissions
import
IsValidUser
,
IsSuperUser
,
IsSuperUserOrAppUser
...
@@ -19,9 +20,12 @@ class AssetPermissionViewSet(viewsets.ModelViewSet):
...
@@ -19,9 +20,12 @@ class AssetPermissionViewSet(viewsets.ModelViewSet):
"""
"""
资产授权列表的增删改查api
资产授权列表的增删改查api
"""
"""
filter_fields
=
(
"name"
,)
search_fields
=
filter_fields
queryset
=
AssetPermission
.
objects
.
all
()
queryset
=
AssetPermission
.
objects
.
all
()
serializer_class
=
serializers
.
AssetPermissionCreateUpdateSerializer
serializer_class
=
serializers
.
AssetPermissionCreateUpdateSerializer
permission_classes
=
(
IsSuperUser
,)
permission_classes
=
(
IsSuperUser
,)
pagination_class
=
LimitOffsetPagination
def
get_serializer_class
(
self
):
def
get_serializer_class
(
self
):
if
self
.
action
in
(
"list"
,
'retrieve'
):
if
self
.
action
in
(
"list"
,
'retrieve'
):
...
...
apps/perms/templates/perms/asset_permission_list.html
View file @
2cb5876d
...
@@ -208,7 +208,7 @@ function initTable() {
...
@@ -208,7 +208,7 @@ function initTable() {
select
:
{},
select
:
{},
op_html
:
$
(
'#actions'
).
html
()
op_html
:
$
(
'#actions'
).
html
()
};
};
table
=
jumpserver
.
initDataTable
(
options
);
table
=
jumpserver
.
init
ServerSide
DataTable
(
options
);
return
table
return
table
}
}
...
...
apps/terminal/api.py
View file @
2cb5876d
...
@@ -4,6 +4,7 @@ from collections import OrderedDict
...
@@ -4,6 +4,7 @@ from collections import OrderedDict
import
logging
import
logging
import
os
import
os
import
uuid
import
uuid
import
copy
from
django.core.cache
import
cache
from
django.core.cache
import
cache
from
django.shortcuts
import
get_object_or_404
,
redirect
from
django.shortcuts
import
get_object_or_404
,
redirect
...
@@ -310,6 +311,7 @@ class SessionReplayViewSet(viewsets.ViewSet):
...
@@ -310,6 +311,7 @@ class SessionReplayViewSet(viewsets.ViewSet):
def
retrieve
(
self
,
request
,
*
args
,
**
kwargs
):
def
retrieve
(
self
,
request
,
*
args
,
**
kwargs
):
session_id
=
kwargs
.
get
(
'pk'
)
session_id
=
kwargs
.
get
(
'pk'
)
self
.
session
=
get_object_or_404
(
Session
,
id
=
session_id
)
self
.
session
=
get_object_or_404
(
Session
,
id
=
session_id
)
# 新版本和老版本的文件后缀不同
# 新版本和老版本的文件后缀不同
session_path
=
self
.
get_session_path
()
# 存在外部存储上的路径
session_path
=
self
.
get_session_path
()
# 存在外部存储上的路径
local_path
=
self
.
get_local_path
()
local_path
=
self
.
get_local_path
()
...
...
docs/step_by_step.rst
View file @
2cb5876d
...
@@ -228,7 +228,7 @@ Luna 已改为纯前端,需要 Nginx 来运行访问
...
@@ -228,7 +228,7 @@ Luna 已改为纯前端,需要 Nginx 来运行访问
-p 8081:8080 -v /opt/guacamole/key:/config/guacamole/key \
-p 8081:8080 -v /opt/guacamole/key:/config/guacamole/key \
-e JUMPSERVER_KEY_DIR=/config/guacamole/key \
-e JUMPSERVER_KEY_DIR=/config/guacamole/key \
-e JUMPSERVER_SERVER=http://<填写本机的IP地址>:8080 \
-e JUMPSERVER_SERVER=http://<填写本机的IP地址>:8080 \
registry.jumpserver.org/public/guacamole:
1.0.0
registry.jumpserver.org/public/guacamole:
latest
这里所需要注意的是 guacamole 暴露出来的端口是 8081,若与主机上其他端口冲突请自定义一下。
这里所需要注意的是 guacamole 暴露出来的端口是 8081,若与主机上其他端口冲突请自定义一下。
...
...
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