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
0ddb9476
Commit
0ddb9476
authored
Jul 09, 2018
by
林峰任1049851
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资产授权页面增加分页
资产授权页面增加分页
parent
e7a731fa
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
api.py
apps/perms/api.py
+2
-0
asset_permission_list.html
apps/perms/templates/perms/asset_permission_list.html
+1
-1
No files found.
apps/perms/api.py
View file @
0ddb9476
...
@@ -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
...
@@ -22,6 +23,7 @@ class AssetPermissionViewSet(viewsets.ModelViewSet):
...
@@ -22,6 +23,7 @@ class AssetPermissionViewSet(viewsets.ModelViewSet):
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 @
0ddb9476
...
@@ -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
}
}
...
...
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