diff --git a/backend/src/main/resources/db/migration/V86__v1.10.1_release.sql b/backend/src/main/resources/db/migration/V86__v1.10.1_release.sql index 9e7da65514..b3af88467c 100644 --- a/backend/src/main/resources/db/migration/V86__v1.10.1_release.sql +++ b/backend/src/main/resources/db/migration/V86__v1.10.1_release.sql @@ -82,6 +82,59 @@ values ('test_case_list', insert into system_header (type, props) values ('test_plan_scenario_case', '[{"id":"num","label":"ID"},{"id":"name","label":"名称"},{"id":"level","label":"用例等级"},{"id":"tagNames","label":"标签"},{"id":"userId","label":"创建人"},{"id":"updateTime","label":"最后更新时间"},{"id":"stepTotal","label":"通过"},{"id":"lastResult","label":"失败"},{"id":"passRate","label":"通过率"}]'); + + + +-- 初始化权限 +-- project_admin +insert into user_group_permission (id, group_id, permission_id, module_id) +values (uuid(), 'project_admin', 'PROJECT_TRACK_PLAN:READ+RUN', 'PROJECT_TRACK_PLAN'); +insert into user_group_permission (id, group_id, permission_id, module_id) +values (uuid(), 'project_admin', 'PROJECT_TRACK_ISSUE:READ', 'PROJECT_TRACK_ISSUE'); +insert into user_group_permission (id, group_id, permission_id, module_id) +values (uuid(), 'project_admin', 'PROJECT_TRACK_ISSUE:READ+CREATE', 'PROJECT_TRACK_ISSUE'); +insert into user_group_permission (id, group_id, permission_id, module_id) +values (uuid(), 'project_admin', 'PROJECT_TRACK_ISSUE:READ+EDIT', 'PROJECT_TRACK_ISSUE'); +insert into user_group_permission (id, group_id, permission_id, module_id) +values (uuid(), 'project_admin', 'PROJECT_TRACK_ISSUE:READ+DELETE', 'PROJECT_TRACK_ISSUE'); +insert into user_group_permission (id, group_id, permission_id, module_id) +values (uuid(), 'project_admin', 'PROJECT_TRACK_REPORT:READ', 'PROJECT_TRACK_REPORT'); +insert into user_group_permission (id, group_id, permission_id, module_id) +values (uuid(), 'project_admin', 'PROJECT_TRACK_REPORT:READ+DELETE', 'PROJECT_TRACK_REPORT'); +insert into user_group_permission (id, group_id, permission_id, module_id) +values (uuid(), 'project_admin', 'PROJECT_TRACK_REPORT:READ+EXPORT', 'PROJECT_TRACK_REPORT'); +insert into user_group_permission (id, group_id, permission_id, module_id) +values (uuid(), 'project_admin', 'PROJECT_API_REPORT:READ+EXPORT', 'PROJECT_API_REPORT'); +insert into user_group_permission (id, group_id, permission_id, module_id) +values (uuid(), 'project_admin', 'PROJECT_PERFORMANCE_REPORT:READ+EXPORT', 'PROJECT_PERFORMANCE_REPORT'); + +-- project_member +insert into user_group_permission (id, group_id, permission_id, module_id) +values (uuid(), 'project_member', 'PROJECT_TRACK_PLAN:READ+RUN', 'PROJECT_TRACK_PLAN'); +insert into user_group_permission (id, group_id, permission_id, module_id) +values (uuid(), 'project_member', 'PROJECT_TRACK_ISSUE:READ', 'PROJECT_TRACK_ISSUE'); +insert into user_group_permission (id, group_id, permission_id, module_id) +values (uuid(), 'project_member', 'PROJECT_TRACK_ISSUE:READ+CREATE', 'PROJECT_TRACK_ISSUE'); +insert into user_group_permission (id, group_id, permission_id, module_id) +values (uuid(), 'project_member', 'PROJECT_TRACK_ISSUE:READ+EDIT', 'PROJECT_TRACK_ISSUE'); +insert into user_group_permission (id, group_id, permission_id, module_id) +values (uuid(), 'project_member', 'PROJECT_TRACK_ISSUE:READ+DELETE', 'PROJECT_TRACK_ISSUE'); +insert into user_group_permission (id, group_id, permission_id, module_id) +values (uuid(), 'project_member', 'PROJECT_TRACK_REPORT:READ', 'PROJECT_TRACK_REPORT'); +insert into user_group_permission (id, group_id, permission_id, module_id) +values (uuid(), 'project_member', 'PROJECT_TRACK_REPORT:READ+DELETE', 'PROJECT_TRACK_REPORT'); +insert into user_group_permission (id, group_id, permission_id, module_id) +values (uuid(), 'project_member', 'PROJECT_TRACK_REPORT:READ+EXPORT', 'PROJECT_TRACK_REPORT'); +insert into user_group_permission (id, group_id, permission_id, module_id) +values (uuid(), 'project_member', 'PROJECT_API_REPORT:READ+EXPORT', 'PROJECT_API_REPORT'); +insert into user_group_permission (id, group_id, permission_id, module_id) +values (uuid(), 'project_member', 'PROJECT_PERFORMANCE_REPORT:READ+EXPORT', 'PROJECT_PERFORMANCE_REPORT'); + +-- read_only +insert into user_group_permission (id, group_id, permission_id, module_id) +values (uuid(), 'read_only', 'PROJECT_TRACK_ISSUE:READ', 'PROJECT_TRACK_ISSUE'); +insert into user_group_permission (id, group_id, permission_id, module_id) +values (uuid(), 'read_only', 'PROJECT_TRACK_REPORT:READ', 'PROJECT_TRACK_REPORT'); -- 接口定义添加用例总数,用例状态,用例通过率字段 alter table api_definition add case_total varchar(100) null; diff --git a/backend/src/main/resources/permission.json b/backend/src/main/resources/permission.json index aeb4b16c4b..9c1ae39cef 100644 --- a/backend/src/main/resources/permission.json +++ b/backend/src/main/resources/permission.json @@ -486,7 +486,7 @@ }, { "id": "PROJECT_TRACK_REVIEW:READ+REVIEW", - "name": "开始评审", + "name": "评审用例", "resourceId": "PROJECT_TRACK_REVIEW" }, { @@ -529,6 +529,11 @@ "name": "关联/取消关联用例", "resourceId": "PROJECT_TRACK_PLAN" }, + { + "id": "PROJECT_TRACK_PLAN:READ+RUN", + "name": "执行测试计划", + "resourceId": "PROJECT_TRACK_PLAN" + }, { "id": "PROJECT_TRACK_PLAN:READ+REPORT_DELETE", "name": "删除测试计划报告", @@ -549,6 +554,41 @@ "name": "批量编辑用例", "resourceId": "PROJECT_TRACK_PLAN" }, + { + "id": "PROJECT_TRACK_ISSUE:READ", + "name": "查询缺陷", + "resourceId": "PROJECT_TRACK_ISSUE" + }, + { + "id": "PROJECT_TRACK_ISSUE:READ+CREATE", + "name": "创建缺陷", + "resourceId": "PROJECT_TRACK_ISSUE" + }, + { + "id": "PROJECT_TRACK_ISSUE:READ+EDIT", + "name": "编辑缺陷", + "resourceId": "PROJECT_TRACK_ISSUE" + }, + { + "id": "PROJECT_TRACK_ISSUE:READ+DELETE", + "name": "删除缺陷", + "resourceId": "PROJECT_TRACK_ISSUE" + }, + { + "id": "PROJECT_TRACK_REPORT:READ", + "name": "查询报告", + "resourceId": "PROJECT_TRACK_REPORT" + }, + { + "id": "PROJECT_TRACK_REPORT:READ+DELETE", + "name": "删除报告", + "resourceId": "PROJECT_TRACK_REPORT" + }, + { + "id": "PROJECT_TRACK_REPORT:READ+EXPORT", + "name": "导出报告", + "resourceId": "PROJECT_TRACK_REPORT" + }, { "id": "PROJECT_API_DEFINITION:READ", "name": "查询接口", @@ -689,6 +729,11 @@ "name": "删除报告", "resourceId": "PROJECT_API_REPORT" }, + { + "id": "PROJECT_API_REPORT:READ+EXPORT", + "name": "导出报告", + "resourceId": "PROJECT_API_REPORT" + }, { "id": "PROJECT_PERFORMANCE_TEST:READ", "name": "查询测试", @@ -733,6 +778,11 @@ "id": "PROJECT_PERFORMANCE_REPORT:READ+DELETE", "name": "删除报告", "resourceId": "PROJECT_PERFORMANCE_REPORT" + }, + { + "id": "PROJECT_PERFORMANCE_REPORT:READ+EXPORT", + "name": "导出报告", + "resourceId": "PROJECT_PERFORMANCE_REPORT" } ], "resource": [ @@ -844,6 +894,14 @@ "id": "PROJECT_TRACK_PLAN", "name": "测试计划" }, + { + "id": "PROJECT_TRACK_ISSUE", + "name": "缺陷" + }, + { + "id": "PROJECT_TRACK_REPORT", + "name": "报告" + }, { "id": "PROJECT_API_DEFINITION", "name": "接口定义"