From eef067c9ca83c285255ef28a10ebfc6ef34fd36d Mon Sep 17 00:00:00 2001 From: Bai Date: Tue, 14 Feb 2023 14:17:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=8E=88=E6=9D=83?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E7=BB=84=E7=BB=87=E8=A7=92=E8=89=B2=E6=9D=83?= =?UTF-8?q?=E9=99=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/rbac/api/role.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/rbac/api/role.py b/apps/rbac/api/role.py index e2cca9bf0..97c0c76e3 100644 --- a/apps/rbac/api/role.py +++ b/apps/rbac/api/role.py @@ -89,11 +89,15 @@ class RoleViewSet(JMSModelViewSet): class SystemRoleViewSet(RoleViewSet): + perm_model = SystemRole + def get_queryset(self): return super().get_queryset().filter(scope='system') class OrgRoleViewSet(RoleViewSet): + perm_model = OrgRole + def get_queryset(self): return super().get_queryset().filter(scope='org')