From fa2c70c6bea764eb3f31f4669e66c41f97597628 Mon Sep 17 00:00:00 2001 From: ibuler Date: Mon, 7 Mar 2022 14:38:09 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BF=AE=E6=94=B9=20perm=20node=20titl?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/rbac/const.py | 3 ++- apps/rbac/tree.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/rbac/const.py b/apps/rbac/const.py index 1aa232576..6a723a1bc 100644 --- a/apps/rbac/const.py +++ b/apps/rbac/const.py @@ -43,7 +43,7 @@ exclude_permissions = ( ('perms', 'rebuildusertreetask', '*', '*'), ('rbac', 'contenttype', '*', '*'), ('rbac', 'permission', 'add,delete,change', 'permission'), - ('rbac', 'rolebingding', '*', '*'), + ('rbac', 'rolebinding', '*', '*'), ('rbac', 'role', '*', '*'), ('ops', 'adhoc', '*', '*'), ('ops', 'adhocexecution', '*', '*'), @@ -77,6 +77,7 @@ only_system_permissions = ( ('orgs', 'organization', '*', '*'), ('xpack', 'license', '*', '*'), ('settings', 'setting', '*', '*'), + ('ops', 'task', 'view', 'taskmonitor'), ('terminal', 'terminal', '*', '*'), ('terminal', 'commandstorage', '*', '*'), ('terminal', 'replaystorage', '*', '*'), diff --git a/apps/rbac/tree.py b/apps/rbac/tree.py index e0b29a617..e55976db7 100644 --- a/apps/rbac/tree.py +++ b/apps/rbac/tree.py @@ -339,7 +339,7 @@ class PermissionTreeUtil: node = TreeNode(**{ 'id': p.id, 'name': name, - 'title': p.name, + 'title': p.app_label_codename, 'pId': model_id, 'isParent': False, 'chkDisabled': self.check_disabled,