Unverified Commit 45b13abe authored by 老广's avatar 老广 Committed by GitHub

Merge pull request #1204 from jumpserver/bugfix_user_assets

[Bugfix] 修复用户看不到我的资产的bug
parents 3ccb6637 72cd7a3b
......@@ -98,6 +98,11 @@ class UserGrantedNodesApi(ListAPIView):
nodes = AssetPermissionUtil.get_user_nodes_with_assets(user)
return nodes.keys()
def get_permissions(self):
if self.kwargs.get('pk') is None:
self.permission_classes = (IsValidUser,)
return super().get_permissions()
class UserGrantedNodesWithAssetsApi(ListAPIView):
permission_classes = (IsSuperUserOrAppUser,)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment