From 2587c8693eda6f83ad91514188a4bb5494b96ae8 Mon Sep 17 00:00:00 2001 From: feng626 <1304903146@qq.com> Date: Thu, 17 Mar 2022 00:55:23 +0800 Subject: [PATCH] fix: account_change_pwd --- apps/assets/api/accounts.py | 2 +- apps/rbac/permissions.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/assets/api/accounts.py b/apps/assets/api/accounts.py index b4e75122b..9989599b8 100644 --- a/apps/assets/api/accounts.py +++ b/apps/assets/api/accounts.py @@ -65,7 +65,7 @@ class AccountViewSet(OrgBulkModelViewSet): } rbac_perms = { 'verify_account': 'assets.test_authbook', - 'PATCH': 'assets.change_assetaccountsecret' + 'partial_update': 'assets.change_assetaccountsecret', } def get_queryset(self): diff --git a/apps/rbac/permissions.py b/apps/rbac/permissions.py index 7119181c7..bfcb71cc7 100644 --- a/apps/rbac/permissions.py +++ b/apps/rbac/permissions.py @@ -109,7 +109,6 @@ class RBACPermission(permissions.DjangoModelPermissions): if not action: action = request.method perms = self._get_action_perms(action, model_cls, view) - print(model_cls, perms, action) return perms def has_permission(self, request, view):