From 416d4bd0c31aba86932cf383b12cba23e0476475 Mon Sep 17 00:00:00 2001 From: fit2bot <68588906+fit2bot@users.noreply.github.com> Date: Fri, 11 Mar 2022 17:24:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dtree=20(#7802)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: feng626 <1304903146@qq.com> --- apps/rbac/builtin.py | 1 + apps/rbac/const.py | 4 +++- .../migrations/0008_auto_20220311_1623.py | 17 +++++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 apps/settings/migrations/0008_auto_20220311_1623.py diff --git a/apps/rbac/builtin.py b/apps/rbac/builtin.py index 64a73d546..0fe12195e 100644 --- a/apps/rbac/builtin.py +++ b/apps/rbac/builtin.py @@ -22,6 +22,7 @@ auditor_perms = user_perms + ( ('terminal', 'sessionreplay', 'view,download', 'sessionreplay'), ('terminal', 'session', '*', '*'), ('terminal', 'command', '*', '*'), + ('ops', 'commandexecution', 'view', 'commandexecution') ) diff --git a/apps/rbac/const.py b/apps/rbac/const.py index 15ae12b05..9e25279fb 100644 --- a/apps/rbac/const.py +++ b/apps/rbac/const.py @@ -60,11 +60,14 @@ exclude_permissions = ( ('audits', 'passwordchangelog', 'add,change,delete', 'passwordchangelog'), ('audits', 'userloginlog', 'add,change,delete,change', 'userloginlog'), ('audits', 'ftplog', 'change,delete', 'ftplog'), + ('tickets', 'ticketassignee', '*', 'ticketassignee'), ('tickets', 'ticketflow', 'add,delete', 'ticketflow'), ('tickets', 'comment', 'change,delete', 'comment'), ('tickets', 'ticket', 'delete', 'ticket'), ('tickets', 'ticketstep', '*', '*'), ('tickets', 'approvalrule', '*', '*'), + ('tickets', 'superticket', 'delete', 'superticket'), + ('tickets', 'ticketsession', 'delete', 'ticketsession'), ('xpack', 'interface', '*', '*'), ('xpack', 'license', '*', '*'), ('xpack', 'syncinstancedetail', 'add,delete,change', 'syncinstancedetail'), @@ -87,7 +90,6 @@ only_system_permissions = ( ('rbac', 'rolebinding', '*', '*'), ('rbac', 'systemrolebinding', '*', '*'), ('rbac', 'orgrole', 'delete,add,change', '*'), - ('rbac', 'orgrolebinding', 'delete,add,change', '*'), ('orgs', 'organization', '*', '*'), ('xpack', 'license', '*', '*'), ('settings', 'setting', '*', '*'), diff --git a/apps/settings/migrations/0008_auto_20220311_1623.py b/apps/settings/migrations/0008_auto_20220311_1623.py new file mode 100644 index 000000000..91f342927 --- /dev/null +++ b/apps/settings/migrations/0008_auto_20220311_1623.py @@ -0,0 +1,17 @@ +# Generated by Django 3.1.14 on 2022-03-11 08:23 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('settings', '0007_auto_20220310_2006'), + ] + + operations = [ + migrations.AlterModelOptions( + name='setting', + options={'permissions': [('change_basic', 'Can change basic setting'), ('change_email', 'Can change email setting'), ('change_auth', 'Can change auth setting'), ('change_systemmsgsubscription', 'Can sys msg sub setting'), ('change_sms', 'Can change sms setting'), ('change_security', 'Can change security setting'), ('change_clean', 'Can change clean setting'), ('change_interface', 'Can change interface setting'), ('change_license', 'Can change license setting'), ('change_terminal', 'Can change terminal setting'), ('change_other', 'Can change other setting')], 'verbose_name': 'System setting'}, + ), + ]