mirror of https://github.com/jumpserver/jumpserver
[Bugfix] 修复org下用户查看我的资产不显示已授权节点/资产的bug
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