refactor(测试跟踪): 新增测试计划报告编辑的权限
--bug=1026331 --user=陈建星 [系统设置] github#24462 项目成员想修改报告名称,但修改不了,原因 修改名称的权限和删除报告权限是同一个 https://www.tapd.cn/55049933/s/1374441
This commit is contained in:
parent
c0d244003b
commit
69d3e9a8e1
|
@ -2947,6 +2947,7 @@ const message = {
|
|||
project_track_report: {
|
||||
name: "Report",
|
||||
read: "READ",
|
||||
edit: "EDIT",
|
||||
delete: "DELETE",
|
||||
export: "EXPORT",
|
||||
},
|
||||
|
|
|
@ -2852,6 +2852,7 @@ const message = {
|
|||
project_track_report: {
|
||||
name: "报告",
|
||||
read: "查询报告",
|
||||
edit: "编辑报告",
|
||||
delete: "删除报告",
|
||||
export: "导出报告",
|
||||
},
|
||||
|
|
|
@ -2847,6 +2847,7 @@ const message = {
|
|||
project_track_report: {
|
||||
name: "報告",
|
||||
read: "查詢報告",
|
||||
edit: "編輯報告",
|
||||
delete: "刪除報告",
|
||||
export: "導出報告",
|
||||
},
|
||||
|
|
|
@ -122,6 +122,7 @@ public class PermissionConstants {
|
|||
|
||||
public static final String PROJECT_TRACK_REPORT_READ = "PROJECT_TRACK_REPORT:READ";
|
||||
public static final String PROJECT_TRACK_REPORT_READ_DELETE = "PROJECT_TRACK_REPORT:READ+DELETE";
|
||||
public static final String PROJECT_TRACK_REPORT_READ_EDIT = "PROJECT_TRACK_REPORT:READ+EDIT";
|
||||
public static final String PROJECT_TRACK_REPORT_READ_EXPORT = "PROJECT_TRACK_REPORT:READ+EXPORT";
|
||||
|
||||
public static final String PROJECT_API_DEFINITION_READ = "PROJECT_API_DEFINITION:READ";
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
SET SESSION innodb_lock_wait_timeout = 7200;
|
||||
|
||||
-- 处理兼容数据,角色原本有测试计划报告删除的权限,则添加报告编辑的权限
|
||||
INSERT INTO user_group_permission (id, group_id, permission_id, module_id)
|
||||
SELECT uuid(), group_id, 'PROJECT_TRACK_REPORT:READ+EDIT', 'PROJECT_TRACK_REPORT'
|
||||
FROM user_group_permission WHERE permission_id = 'PROJECT_TRACK_REPORT:READ+DELETE';
|
||||
|
||||
SET SESSION innodb_lock_wait_timeout = DEFAULT;
|
|
@ -212,6 +212,11 @@
|
|||
"name": "permission.project_track_report.read",
|
||||
"resourceId": "PROJECT_TRACK_REPORT"
|
||||
},
|
||||
{
|
||||
"id": "PROJECT_TRACK_REPORT:READ+EDIT",
|
||||
"name": "permission.project_track_report.edit",
|
||||
"resourceId": "PROJECT_TRACK_REPORT"
|
||||
},
|
||||
{
|
||||
"id": "PROJECT_TRACK_REPORT:READ+DELETE",
|
||||
"name": "permission.project_track_report.delete",
|
||||
|
@ -249,4 +254,4 @@
|
|||
"name": "permission.project_track_report.name"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ import {editPlanReport} from "@/api/remote/plan/test-plan";
|
|||
import TestPlanReportContainer from "@/business/plan/view/comonents/report/detail/TestPlanReportContainer";
|
||||
import MsRichText from "@/business/case/components/MsRichText";
|
||||
import {testPlanDbReportEdit} from "@/api/remote/plan/test-plan-report";
|
||||
import {hasPermission} from "@/business/utils/sdk-utils";
|
||||
export default {
|
||||
name: "TestPlanSummaryReport",
|
||||
components: {MsRichText, TestPlanReportContainer, MsFormDivider},
|
||||
|
@ -44,7 +45,7 @@ export default {
|
|||
},
|
||||
computed: {
|
||||
showEdit() {
|
||||
return !this.isTemplate && !this.isShare;
|
||||
return !this.isTemplate && !this.isShare && hasPermission("PROJECT_TRACK_REPORT:READ+EDIT");
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
<ms-table-column
|
||||
prop="name"
|
||||
sortable="custom"
|
||||
permission="PROJECT_TRACK_REPORT:READ+DELETE"
|
||||
permission="PROJECT_TRACK_REPORT:READ+EDIT"
|
||||
:field="item"
|
||||
:fields-width="fieldsWidth"
|
||||
:label="$t('test_track.report.list.name')"
|
||||
|
|
Loading…
Reference in New Issue