From f82f7eba2b99e331d7c12e657403d46e736c0d36 Mon Sep 17 00:00:00 2001 From: "Jiangjie.Bai" Date: Thu, 17 Mar 2022 17:47:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E4=B8=80=E4=BA=9B?= =?UTF-8?q?=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/assets/api/system_user_relation.py | 1 + apps/rbac/const.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/assets/api/system_user_relation.py b/apps/assets/api/system_user_relation.py index 36c16a09b..2d8018e4d 100644 --- a/apps/assets/api/system_user_relation.py +++ b/apps/assets/api/system_user_relation.py @@ -68,6 +68,7 @@ class BaseRelationViewSet(RelationMixin, OrgBulkModelViewSet): class SystemUserAssetRelationViewSet(BaseRelationViewSet): + perm_model = models.AuthBook serializer_class = serializers.SystemUserAssetRelationSerializer model = models.SystemUser.assets.through filterset_fields = [ diff --git a/apps/rbac/const.py b/apps/rbac/const.py index 250a30a0e..b5d584e0b 100644 --- a/apps/rbac/const.py +++ b/apps/rbac/const.py @@ -39,7 +39,7 @@ exclude_permissions = ( ('assets', 'assetuser', '*', '*'), ('assets', 'gathereduser', 'add,delete,change', 'gathereduser'), ('assets', 'accountbackupplanexecution', 'delete,change', 'accountbackupplanexecution'), - ('assets', 'authbook', 'add,change', 'authbook'), + ('assets', 'authbook', 'change', 'authbook'), ('perms', 'userassetgrantedtreenoderelation', '*', '*'), ('perms', 'usergrantedmappingnode', '*', '*'), ('perms', 'permnode', '*', '*'),