mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-07-31 06:22:56 +00:00
[Bugfix] 修复org下用户查看我的资产不显示已授权节点/资产的bug
This commit is contained in:
parent
8f654c37a9
commit
3dc214d1fa
@ -101,6 +101,7 @@ class UserGrantedNodesApi(ListAPIView):
|
||||
return nodes.keys()
|
||||
|
||||
def get_permissions(self):
|
||||
set_current_org(Organization.root())
|
||||
if self.kwargs.get('pk') is None:
|
||||
self.permission_classes = (IsValidUser,)
|
||||
return super().get_permissions()
|
||||
@ -157,6 +158,7 @@ class UserGrantedNodeAssetsApi(ListAPIView):
|
||||
return assets
|
||||
|
||||
def get_permissions(self):
|
||||
set_current_org(Organization.root())
|
||||
if self.kwargs.get('pk') is None:
|
||||
self.permission_classes = (IsValidUser,)
|
||||
return super().get_permissions()
|
||||
|
Loading…
Reference in New Issue
Block a user