refactor(权限设置): 添加部分权限
This commit is contained in:
parent
db1b35e39f
commit
b84a1f4c2d
|
@ -82,6 +82,59 @@ values ('test_case_list',
|
||||||
insert into system_header (type, props)
|
insert into system_header (type, props)
|
||||||
values ('test_plan_scenario_case',
|
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":"通过率"}]');
|
'[{"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
|
alter table api_definition
|
||||||
add case_total varchar(100) null;
|
add case_total varchar(100) null;
|
||||||
|
|
|
@ -486,7 +486,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "PROJECT_TRACK_REVIEW:READ+REVIEW",
|
"id": "PROJECT_TRACK_REVIEW:READ+REVIEW",
|
||||||
"name": "开始评审",
|
"name": "评审用例",
|
||||||
"resourceId": "PROJECT_TRACK_REVIEW"
|
"resourceId": "PROJECT_TRACK_REVIEW"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -529,6 +529,11 @@
|
||||||
"name": "关联/取消关联用例",
|
"name": "关联/取消关联用例",
|
||||||
"resourceId": "PROJECT_TRACK_PLAN"
|
"resourceId": "PROJECT_TRACK_PLAN"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "PROJECT_TRACK_PLAN:READ+RUN",
|
||||||
|
"name": "执行测试计划",
|
||||||
|
"resourceId": "PROJECT_TRACK_PLAN"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "PROJECT_TRACK_PLAN:READ+REPORT_DELETE",
|
"id": "PROJECT_TRACK_PLAN:READ+REPORT_DELETE",
|
||||||
"name": "删除测试计划报告",
|
"name": "删除测试计划报告",
|
||||||
|
@ -549,6 +554,41 @@
|
||||||
"name": "批量编辑用例",
|
"name": "批量编辑用例",
|
||||||
"resourceId": "PROJECT_TRACK_PLAN"
|
"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",
|
"id": "PROJECT_API_DEFINITION:READ",
|
||||||
"name": "查询接口",
|
"name": "查询接口",
|
||||||
|
@ -689,6 +729,11 @@
|
||||||
"name": "删除报告",
|
"name": "删除报告",
|
||||||
"resourceId": "PROJECT_API_REPORT"
|
"resourceId": "PROJECT_API_REPORT"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "PROJECT_API_REPORT:READ+EXPORT",
|
||||||
|
"name": "导出报告",
|
||||||
|
"resourceId": "PROJECT_API_REPORT"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "PROJECT_PERFORMANCE_TEST:READ",
|
"id": "PROJECT_PERFORMANCE_TEST:READ",
|
||||||
"name": "查询测试",
|
"name": "查询测试",
|
||||||
|
@ -733,6 +778,11 @@
|
||||||
"id": "PROJECT_PERFORMANCE_REPORT:READ+DELETE",
|
"id": "PROJECT_PERFORMANCE_REPORT:READ+DELETE",
|
||||||
"name": "删除报告",
|
"name": "删除报告",
|
||||||
"resourceId": "PROJECT_PERFORMANCE_REPORT"
|
"resourceId": "PROJECT_PERFORMANCE_REPORT"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "PROJECT_PERFORMANCE_REPORT:READ+EXPORT",
|
||||||
|
"name": "导出报告",
|
||||||
|
"resourceId": "PROJECT_PERFORMANCE_REPORT"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"resource": [
|
"resource": [
|
||||||
|
@ -844,6 +894,14 @@
|
||||||
"id": "PROJECT_TRACK_PLAN",
|
"id": "PROJECT_TRACK_PLAN",
|
||||||
"name": "测试计划"
|
"name": "测试计划"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "PROJECT_TRACK_ISSUE",
|
||||||
|
"name": "缺陷"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "PROJECT_TRACK_REPORT",
|
||||||
|
"name": "报告"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "PROJECT_API_DEFINITION",
|
"id": "PROJECT_API_DEFINITION",
|
||||||
"name": "接口定义"
|
"name": "接口定义"
|
||||||
|
|
Loading…
Reference in New Issue