From 094ad85d39b2127ce78735299dd92510edb0c74f Mon Sep 17 00:00:00 2001 From: Aaron3S Date: Mon, 27 Feb 2023 17:13:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=BB=98=E8=AE=A4=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=99=AE=E9=80=9A=E7=94=A8=E6=88=B7=E4=BD=9C=E4=B8=9A=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/rbac/builtin.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/apps/rbac/builtin.py b/apps/rbac/builtin.py index e15386bea..a36ee5eea 100644 --- a/apps/rbac/builtin.py +++ b/apps/rbac/builtin.py @@ -18,14 +18,18 @@ user_perms = ( ('assets', 'asset', 'match', 'asset'), ('assets', 'systemuser', 'match', 'systemuser'), ('assets', 'node', 'match', 'node'), + ("ops", "adhoc", "*", "*"), + ("ops", "playbook", "*", "*"), + ("ops", "job", "*", "*"), + ("ops", "jobexecution", "*", "*"), ) system_user_perms = ( - ('authentication', 'connectiontoken', 'add,change,view', 'connectiontoken'), - ('authentication', 'temptoken', 'add,change,view', 'temptoken'), - ('authentication', 'accesskey', '*', '*'), - ('tickets', 'ticket', 'view', 'ticket'), -) + user_perms + _view_all_joined_org_perms + ('authentication', 'connectiontoken', 'add,change,view', 'connectiontoken'), + ('authentication', 'temptoken', 'add,change,view', 'temptoken'), + ('authentication', 'accesskey', '*', '*'), + ('tickets', 'ticket', 'view', 'ticket'), + ) + user_perms + _view_all_joined_org_perms _auditor_perms = ( ('rbac', 'menupermission', 'view', 'audit'), @@ -41,7 +45,6 @@ auditor_perms = user_perms + _auditor_perms system_auditor_perms = system_user_perms + _auditor_perms + _view_root_perms - app_exclude_perms = [ ('users', 'user', 'add,delete', 'user'), ('orgs', 'org', 'add,delete,change', 'org'),