fix: 更新资产详情授权用户权限

pull/7888/head
Jiangjie.Bai 3 years ago committed by Jiangjie.Bai
parent 30556023d1
commit 1a05a942c2

@ -205,6 +205,9 @@ class AssetGatewayListApi(generics.ListAPIView):
class BaseAssetPermUserOrUserGroupListApi(ListAPIView):
rbac_perms = {
'GET': 'assets.view_asset'
}
def get_object(self):
asset_id = self.kwargs.get('pk')
@ -222,6 +225,9 @@ class AssetPermUserListApi(BaseAssetPermUserOrUserGroupListApi):
filterset_class = UserFilter
search_fields = ('username', 'email', 'name', 'id', 'source', 'role')
serializer_class = UserSerializer
rbac_perms = {
'GET': 'assets.view_asset'
}
def get_queryset(self):
perms = self.get_asset_related_perms()

Loading…
Cancel
Save