fix(用户组和权限): 复制测试计划权限控制#1006102

--bug=1006102 --user=lyh 【用户权限】-只读用户可以执行和复制测试计划
https://www.tapd.cn/55049933/s/1038631
This commit is contained in:
shiziyuan9527 2021-08-24 14:23:17 +08:00 committed by 刘瑞斌
parent 420c4b4ed0
commit 5feb9d8c5c
3 changed files with 25 additions and 13 deletions

View File

@ -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');

View File

@ -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": "查询缺陷",

View File

@ -193,7 +193,7 @@
</template>
<template v-slot:middle>
<ms-table-operator-button :tip="$t('commons.copy')" icon="el-icon-copy-document"
@exec="handleCopy(scope.row)"/>
@exec="handleCopy(scope.row)" v-permission="['PROJECT_TRACK_PLAN:READ+COPY']"/>
<ms-table-operator-button v-permission="['PROJECT_TRACK_PLAN:READ+EDIT']"
v-if="!scope.row.reportId"
:tip="$t('test_track.plan_view.create_report')" icon="el-icon-s-data"