refactor(权限管理): 操作日志权限 (#3191)
Co-authored-by: shiziyuan9527 <yuhao.li@fit2cloud.com> Co-authored-by: 刘瑞斌 <bin@fit2cloud.com>
This commit is contained in:
parent
8740698efa
commit
7b755dcc9f
|
@ -203,6 +203,8 @@ INSERT INTO user_group_permission (id, group_id, permission_id, module_id)
|
|||
VALUES (uuid(), 'org_admin', 'ORGANIZATION_SERVICE:READ+EDIT', 'ORGANIZATION_SERVICE');
|
||||
INSERT INTO user_group_permission (id, group_id, permission_id, module_id)
|
||||
VALUES (uuid(), 'org_admin', 'ORGANIZATION_GROUP:READ+DELETE', 'ORGANIZATION_GROUP');
|
||||
insert into user_group_permission (id, group_id, permission_id, module_id)
|
||||
values (uuid(), 'org_admin', 'ORGANIZATION_OPERATING_LOG:READ','ORGANIZATION_OPERATING_LOG');
|
||||
|
||||
-- 组织成员
|
||||
INSERT INTO user_group_permission (id, group_id, permission_id, module_id)
|
||||
|
@ -215,6 +217,8 @@ INSERT INTO user_group_permission (id, group_id, permission_id, module_id)
|
|||
VALUES (uuid(), 'org_member', 'ORGANIZATION_MESSAGE:READ', 'ORGANIZATION_MESSAGE');
|
||||
INSERT INTO user_group_permission (id, group_id, permission_id, module_id)
|
||||
VALUES (uuid(), 'org_member', 'ORGANIZATION_USER:READ', 'ORGANIZATION_USER');
|
||||
insert into user_group_permission (id, group_id, permission_id, module_id)
|
||||
values (uuid(), 'org_member', 'ORGANIZATION_OPERATING_LOG:READ','ORGANIZATION_OPERATING_LOG');
|
||||
|
||||
-- 工作空间管理员
|
||||
INSERT INTO user_group_permission (id, group_id, permission_id, module_id)
|
||||
|
@ -257,6 +261,8 @@ insert into user_group_permission (id, group_id, permission_id, module_id)
|
|||
values (uuid(), 'ws_admin', 'WORKSPACE_PROJECT_ENVIRONMENT:READ+EDIT', 'WORKSPACE_PROJECT_ENVIRONMENT');
|
||||
insert into user_group_permission (id, group_id, permission_id, module_id)
|
||||
values (uuid(), 'ws_admin', 'WORKSPACE_PROJECT_ENVIRONMENT:READ+DELETE', 'WORKSPACE_PROJECT_ENVIRONMENT');
|
||||
insert into user_group_permission (id, group_id, permission_id, module_id)
|
||||
values (uuid(), 'ws_admin', 'WORKSPACE_OPERATING_LOG:READ', 'WORKSPACE_OPERATING_LOG');
|
||||
|
||||
|
||||
-- 工作空间成员
|
||||
|
@ -268,6 +274,8 @@ insert into user_group_permission (id, group_id, permission_id, module_id)
|
|||
values (uuid(), 'ws_member', 'WORKSPACE_PROJECT_ENVIRONMENT:READ', 'WORKSPACE_PROJECT_ENVIRONMENT');
|
||||
insert into user_group_permission (id, group_id, permission_id, module_id)
|
||||
values (uuid(), 'ws_member', 'WORKSPACE_PROJECT_MANAGER:READ', 'WORKSPACE_PROJECT_MANAGER');
|
||||
insert into user_group_permission (id, group_id, permission_id, module_id)
|
||||
values (uuid(), 'ws_member', 'WORKSPACE_OPERATING_LOG:READ', 'WORKSPACE_OPERATING_LOG');
|
||||
|
||||
-- 项目管理员
|
||||
INSERT INTO user_group_permission (id, group_id, permission_id, module_id)
|
||||
|
@ -407,13 +415,14 @@ VALUES (uuid(), 'project_admin', 'PROJECT_ENVIRONMENT:READ', 'PROJECT_ENVIRONMEN
|
|||
INSERT INTO user_group_permission (id, group_id, permission_id, module_id)
|
||||
VALUES (uuid(), 'project_admin', 'PROJECT_TRACK_CASE:READ+COPY', 'PROJECT_TRACK_CASE');
|
||||
insert into user_group_permission (id, group_id, permission_id, module_id)
|
||||
values (uuid(), 'project_admin', 'PROJECT_OPERATING_LOG:READ', 'PROJECT_OPERATING_LOG');
|
||||
insert into user_group_permission (id, group_id, permission_id, module_id)
|
||||
values (uuid(), 'project_admin', 'PROJECT_TRACK_PLAN:READ+CASE_BATCH_EDIT', 'PROJECT_TRACK_PLAN');
|
||||
insert into user_group_permission (id, group_id, permission_id, module_id)
|
||||
values (uuid(), 'project_admin', 'PROJECT_TRACK_PLAN:READ+CASE_BATCH_RUN', 'PROJECT_TRACK_PLAN');
|
||||
insert into metersphere_dev.user_group_permission (id, group_id, permission_id, module_id)
|
||||
insert into user_group_permission (id, group_id, permission_id, module_id)
|
||||
values (uuid(), 'project_admin', 'PROJECT_TRACK_PLAN:READ+CASE_BATCH_DELETE','PROJECT_TRACK_PLAN');
|
||||
|
||||
|
||||
-- 项目成员
|
||||
INSERT INTO user_group_permission (id, group_id, permission_id, module_id)
|
||||
VALUES (uuid(), 'project_member', 'PROJECT_API_DEFINITION:READ+DELETE_CASE', 'PROJECT_API_DEFINITION');
|
||||
|
@ -548,10 +557,12 @@ VALUES (uuid(), 'project_member', 'PROJECT_API_SCENARIO:READ+RUN', 'PROJECT_API_
|
|||
INSERT INTO user_group_permission (id, group_id, permission_id, module_id)
|
||||
VALUES (uuid(), 'project_member', 'PROJECT_TRACK_PLAN:READ', 'PROJECT_TRACK_PLAN');
|
||||
insert into user_group_permission (id, group_id, permission_id, module_id)
|
||||
values (uuid(), 'project_member', 'PROJECT_OPERATING_LOG:READ', 'PROJECT_OPERATING_LOG');
|
||||
insert into metersphere_dev.user_group_permission (id, group_id, permission_id, module_id)
|
||||
values (uuid(), 'project_member', 'PROJECT_TRACK_PLAN:READ+CASE_BATCH_EDIT', 'PROJECT_TRACK_PLAN');
|
||||
insert into user_group_permission (id, group_id, permission_id, module_id)
|
||||
values (uuid(), 'project_member', 'PROJECT_TRACK_PLAN:READ+CASE_BATCH_RUN', 'PROJECT_TRACK_PLAN');
|
||||
insert into metersphere_dev.user_group_permission (id, group_id, permission_id, module_id)
|
||||
insert into user_group_permission (id, group_id, permission_id, module_id)
|
||||
values (uuid(), 'project_member', 'PROJECT_TRACK_PLAN:READ+CASE_BATCH_DELETE','PROJECT_TRACK_PLAN');
|
||||
|
||||
-- 只读用户
|
||||
|
@ -576,4 +587,6 @@ VALUES (uuid(), 'read_only', 'PROJECT_API_REPORT:READ', 'PROJECT_API_REPORT');
|
|||
INSERT INTO user_group_permission (id, group_id, permission_id, module_id)
|
||||
VALUES (uuid(), 'read_only', 'PROJECT_USER:READ', 'PROJECT_USER');
|
||||
INSERT INTO user_group_permission (id, group_id, permission_id, module_id)
|
||||
VALUES (uuid(), 'read_only', 'PROJECT_MANAGER:READ', 'PROJECT_MANAGER');
|
||||
VALUES (uuid(), 'read_only', 'PROJECT_MANAGER:READ', 'PROJECT_MANAGER');
|
||||
insert into user_group_permission (id, group_id, permission_id, module_id)
|
||||
values (uuid(), 'read_only', 'PROJECT_OPERATING_LOG:READ', 'PROJECT_OPERATING_LOG');
|
|
@ -239,6 +239,11 @@
|
|||
"name": "编辑",
|
||||
"resourceId": "ORGANIZATION_MESSAGE"
|
||||
},
|
||||
{
|
||||
"id": "ORGANIZATION_OPERATING_LOG:READ",
|
||||
"name": "查询操作日志",
|
||||
"resourceId": "ORGANIZATION_OPERATING_LOG"
|
||||
},
|
||||
{
|
||||
"id": "WORKSPACE_USER:READ",
|
||||
"name": "查询成员",
|
||||
|
@ -314,6 +319,11 @@
|
|||
"name": "导出环境",
|
||||
"resourceId": "WORKSPACE_PROJECT_ENVIRONMENT"
|
||||
},
|
||||
{
|
||||
"id": "WORKSPACE_OPERATING_LOG:READ",
|
||||
"name": "查询操作日志",
|
||||
"resourceId": "WORKSPACE_OPERATING_LOG"
|
||||
},
|
||||
{
|
||||
"id": "WORKSPACE_TEMPLATE:READ",
|
||||
"name": "查询",
|
||||
|
@ -414,6 +424,11 @@
|
|||
"name": "导出环境",
|
||||
"resourceId": "PROJECT_ENVIRONMENT"
|
||||
},
|
||||
{
|
||||
"id": "PROJECT_OPERATING_LOG:READ",
|
||||
"name": "查询操作日志",
|
||||
"resourceId": "PROJECT_OPERATING_LOG"
|
||||
},
|
||||
{
|
||||
"id": "PROJECT_TRACK_CASE:READ",
|
||||
"name": "查询用例",
|
||||
|
@ -772,6 +787,10 @@
|
|||
"id": "ORGANIZATION_MESSAGE",
|
||||
"name": "消息设置"
|
||||
},
|
||||
{
|
||||
"id": "ORGANIZATION_OPERATING_LOG",
|
||||
"name": "操作日志"
|
||||
},
|
||||
{
|
||||
"id": "WORKSPACE_USER",
|
||||
"name": "成员"
|
||||
|
@ -788,6 +807,10 @@
|
|||
"id": "WORKSPACE_PROJECT_ENVIRONMENT",
|
||||
"name": "环境设置"
|
||||
},
|
||||
{
|
||||
"id": "WORKSPACE_OPERATING_LOG",
|
||||
"name": "操作日志"
|
||||
},
|
||||
{
|
||||
"id": "PROJECT_USER",
|
||||
"name": "成员"
|
||||
|
@ -800,6 +823,10 @@
|
|||
"id": "PROJECT_ENVIRONMENT",
|
||||
"name": "环境设置"
|
||||
},
|
||||
{
|
||||
"id": "PROJECT_OPERATING_LOG",
|
||||
"name": "操作日志"
|
||||
},
|
||||
{
|
||||
"id": "PROJECT_TRACK_CASE",
|
||||
"name": "测试用例"
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
</el-submenu>
|
||||
|
||||
<el-submenu index="2"
|
||||
v-permission="['ORGANIZATION_USER:READ', 'ORGANIZATION_WORKSPACE:READ','ORGANIZATION_SERVICE:READ','ORGANIZATION_MESSAGE:READ']">
|
||||
v-permission="['ORGANIZATION_USER:READ', 'ORGANIZATION_WORKSPACE:READ','ORGANIZATION_SERVICE:READ','ORGANIZATION_MESSAGE:READ', 'ORGANIZATION_OPERATING_LOG:READ']">
|
||||
<template v-slot:title>
|
||||
<font-awesome-icon class="icon organization" :icon="['far', 'building']" size="lg"/>
|
||||
<span>{{ $t('commons.organization') }}</span>
|
||||
|
|
|
@ -138,19 +138,19 @@ export default {
|
|||
path: 'operatingLog/organization',
|
||||
component: () => import('@/business/components/settings/operatinglog/OperatingLog'),
|
||||
name:'organization',
|
||||
meta: {organization: true, title: 'operating_log.title', permissions: ['SYSTEM_OPERATING_LOG:READ']}
|
||||
meta: {organization: true, title: 'operating_log.title', permissions: ['ORGANIZATION_OPERATING_LOG:READ']}
|
||||
},
|
||||
{
|
||||
path: 'operatingLog/workspace',
|
||||
component: () => import('@/business/components/settings/operatinglog/OperatingLog'),
|
||||
name:'workspace',
|
||||
meta: {workspace: true, title: 'operating_log.title', permissions: ['SYSTEM_OPERATING_LOG:READ']}
|
||||
meta: {workspace: true, title: 'operating_log.title', permissions: ['WORKSPACE_OPERATING_LOG:READ']}
|
||||
},
|
||||
{
|
||||
path: 'operatingLog/project',
|
||||
name:'project',
|
||||
component: () => import('@/business/components/settings/operatinglog/OperatingLog'),
|
||||
meta: {project: true, title: 'operating_log.title', permissions: ['SYSTEM_OPERATING_LOG:READ']}
|
||||
meta: {project: true, title: 'operating_log.title', permissions: ['PROJECT_OPERATING_LOG:READ']}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit e6cc6ba0e8264f4f3780448b60dc149aef8a2cbc
|
||||
Subproject commit 0af67efb336b3f5f6718c7b2684de4d4985c0aee
|
Loading…
Reference in New Issue