From 5feb9d8c5c497b6b4a4b786c30cbd21965c8bed5 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Tue, 24 Aug 2021 14:23:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=94=A8=E6=88=B7=E7=BB=84=E5=92=8C?= =?UTF-8?q?=E6=9D=83=E9=99=90):=20=E5=A4=8D=E5=88=B6=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E6=9D=83=E9=99=90=E6=8E=A7=E5=88=B6#1006102?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1006102 --user=lyh 【用户权限】-只读用户可以执行和复制测试计划 https://www.tapd.cn/55049933/s/1038631 --- .../db/migration/V93__v1.12_release.sql | 7 +++++ backend/src/main/resources/permission.json | 29 +++++++++++-------- .../track/plan/components/TestPlanList.vue | 2 +- 3 files changed, 25 insertions(+), 13 deletions(-) diff --git a/backend/src/main/resources/db/migration/V93__v1.12_release.sql b/backend/src/main/resources/db/migration/V93__v1.12_release.sql index efd3199efa..6ef19ce400 100644 --- a/backend/src/main/resources/db/migration/V93__v1.12_release.sql +++ b/backend/src/main/resources/db/migration/V93__v1.12_release.sql @@ -264,3 +264,10 @@ CREATE TABLE IF NOT EXISTS `test_plan_report_content` ( PRIMARY KEY ( `id` ), UNIQUE KEY `test_plan_report_id` ( `test_plan_report_id` ) ) ENGINE = INNODB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci; + + +# 复制测试计划权限 +insert into user_group_permission (id, group_id, permission_id, module_id) +values (UUID(), 'project_admin', 'PROJECT_TRACK_PLAN:READ+COPY', 'PROJECT_TRACK_PLAN'); +insert into user_group_permission (id, group_id, permission_id, module_id) +values (UUID(), 'project_member', 'PROJECT_TRACK_PLAN:READ+COPY', 'PROJECT_TRACK_PLAN'); diff --git a/backend/src/main/resources/permission.json b/backend/src/main/resources/permission.json index 39c4a9ce4d..75812240ca 100644 --- a/backend/src/main/resources/permission.json +++ b/backend/src/main/resources/permission.json @@ -511,13 +511,8 @@ "resourceId": "PROJECT_TRACK_PLAN" }, { - "id": "PROJECT_TRACK_PLAN:READ+SCHEDULE", - "name": "定时任务", - "resourceId": "PROJECT_TRACK_PLAN" - }, - { - "id": "PROJECT_TRACK_PLAN:READ+RELEVANCE_OR_CANCEL", - "name": "关联/取消关联用例", + "id": "PROJECT_TRACK_PLAN:READ+COPY", + "name": "复制测试计划", "resourceId": "PROJECT_TRACK_PLAN" }, { @@ -525,11 +520,6 @@ "name": "执行测试计划", "resourceId": "PROJECT_TRACK_PLAN" }, - { - "id": "PROJECT_TRACK_PLAN:READ+CASE_BATCH_DELETE", - "name": "批量取消关联用例", - "resourceId": "PROJECT_TRACK_PLAN" - }, { "id": "PROJECT_TRACK_PLAN:READ+CASE_BATCH_RUN", "name": "批量执行用例", @@ -540,6 +530,21 @@ "name": "批量编辑用例", "resourceId": "PROJECT_TRACK_PLAN" }, + { + "id": "PROJECT_TRACK_PLAN:READ+SCHEDULE", + "name": "定时任务", + "resourceId": "PROJECT_TRACK_PLAN" + }, + { + "id": "PROJECT_TRACK_PLAN:READ+RELEVANCE_OR_CANCEL", + "name": "关联/取消关联用例", + "resourceId": "PROJECT_TRACK_PLAN" + }, + { + "id": "PROJECT_TRACK_PLAN:READ+CASE_BATCH_DELETE", + "name": "批量取消关联用例", + "resourceId": "PROJECT_TRACK_PLAN" + }, { "id": "PROJECT_TRACK_ISSUE:READ", "name": "查询缺陷", diff --git a/frontend/src/business/components/track/plan/components/TestPlanList.vue b/frontend/src/business/components/track/plan/components/TestPlanList.vue index a994d5015c..0104a7f8de 100644 --- a/frontend/src/business/components/track/plan/components/TestPlanList.vue +++ b/frontend/src/business/components/track/plan/components/TestPlanList.vue @@ -193,7 +193,7 @@