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
bb13003a
Commit
bb13003a
authored
Sep 03, 2018
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bugfix] 修复资产权限
parent
9a18817d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
asset.py
apps/assets/api/asset.py
+4
-5
No files found.
apps/assets/api/asset.py
View file @
bb13003a
...
...
@@ -2,9 +2,8 @@
#
import
random
import
time
from
rest_framework
import
generics
,
permissions
from
rest_framework
import
generics
from
rest_framework.response
import
Response
from
rest_framework_bulk
import
BulkModelViewSet
from
rest_framework_bulk
import
ListBulkCreateUpdateDestroyAPIView
...
...
@@ -14,8 +13,8 @@ from django.db.models import Q
from
common.mixins
import
IDInFilterMixin
from
common.utils
import
get_logger
from
common.permissions
import
IsOrgAdmin
,
Is
AppUser
,
Is
OrgAdminOrAppUser
from
..models
import
Asset
,
SystemUser
,
AdminUser
,
Node
from
common.permissions
import
IsOrgAdmin
,
IsOrgAdminOrAppUser
from
..models
import
Asset
,
AdminUser
,
Node
from
..
import
serializers
from
..tasks
import
update_asset_hardware_info_manual
,
\
test_asset_connectability_manual
...
...
@@ -40,7 +39,7 @@ class AssetViewSet(IDInFilterMixin, LabelFilter, BulkModelViewSet):
queryset
=
Asset
.
objects
.
all
()
serializer_class
=
serializers
.
AssetSerializer
pagination_class
=
LimitOffsetPagination
permission_classes
=
(
permissions
.
AllowAny
,)
permission_classes
=
(
IsOrgAdminOrAppUser
,)
def
filter_node
(
self
):
node_id
=
self
.
request
.
query_params
.
get
(
"node_id"
)
...
...
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