From 5507e63af7c8c71cedeb4d29d041eb2e063c07b7 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Tue, 25 May 2021 16:53:51 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=9D=83=E9=99=90=E7=AE=A1=E7=90=86):?= =?UTF-8?q?=20=E6=9D=83=E9=99=90=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V85__v1.10_permission_refactor.sql | 13 ++++++++----- backend/src/main/resources/permission.json | 9 +++++++++ .../settings/organization/OrganizationMember.vue | 2 +- frontend/src/business/components/settings/router.js | 2 +- .../components/settings/system/group/UserGroup.vue | 10 +++++----- 5 files changed, 24 insertions(+), 12 deletions(-) diff --git a/backend/src/main/resources/db/migration/V85__v1.10_permission_refactor.sql b/backend/src/main/resources/db/migration/V85__v1.10_permission_refactor.sql index 84b602ad7c..cb3ce0c212 100644 --- a/backend/src/main/resources/db/migration/V85__v1.10_permission_refactor.sql +++ b/backend/src/main/resources/db/migration/V85__v1.10_permission_refactor.sql @@ -162,6 +162,9 @@ INSERT INTO `user_group_permission` (`id`, `group_id`, `permission_id`, `module_ VALUES (uuid(), 'admin', 'SYSTEM_TEST_POOL:READ', 'SYSTEM_TEST_POOL'); INSERT INTO `user_group_permission` (`id`, `group_id`, `permission_id`, `module_id`) VALUES (uuid(), 'admin', 'SYSTEM_TEST_POOL:READ+EDIT', 'SYSTEM_TEST_POOL'); +insert into metersphere_dev.user_group_permission (id, group_id, permission_id, module_id) +values (uuid(), 'admin', 'SYSTEM_OPERATING_LOG:READ', 'SYSTEM_OPERATING_LOG'); + -- 组织管理员 INSERT INTO user_group_permission (id, group_id, permission_id, module_id) @@ -241,15 +244,15 @@ values (uuid(), 'ws_admin', 'WORKSPACE_PROJECT_MANAGER:READ+DELETE', 'WORKSPACE_ insert into user_group_permission (id, group_id, permission_id, module_id) values (uuid(), 'ws_admin', 'WORKSPACE_PROJECT_MANAGER:READ+EDIT', 'WORKSPACE_PROJECT_MANAGER'); insert into user_group_permission (id, group_id, permission_id, module_id) -values (uuid(), 'ws_admin', 'WORKSPACE_PROJECT_ENVIRONMENT:READ','WORKSPACE_PROJECT_ENVIRONMENT'); +values (uuid(), 'ws_admin', 'WORKSPACE_PROJECT_ENVIRONMENT:READ', 'WORKSPACE_PROJECT_ENVIRONMENT'); insert into user_group_permission (id, group_id, permission_id, module_id) -values (uuid(), 'ws_admin', 'WORKSPACE_PROJECT_ENVIRONMENT:READ+COPY','WORKSPACE_PROJECT_ENVIRONMENT'); +values (uuid(), 'ws_admin', 'WORKSPACE_PROJECT_ENVIRONMENT:READ+COPY', 'WORKSPACE_PROJECT_ENVIRONMENT'); insert into user_group_permission (id, group_id, permission_id, module_id) -values (uuid(), 'ws_admin', 'WORKSPACE_PROJECT_ENVIRONMENT:READ+CREATE','WORKSPACE_PROJECT_ENVIRONMENT'); +values (uuid(), 'ws_admin', 'WORKSPACE_PROJECT_ENVIRONMENT:READ+CREATE', 'WORKSPACE_PROJECT_ENVIRONMENT'); insert into user_group_permission (id, group_id, permission_id, module_id) -values (uuid(), 'ws_admin', 'WORKSPACE_PROJECT_ENVIRONMENT:READ+IMPORT','WORKSPACE_PROJECT_ENVIRONMENT'); +values (uuid(), 'ws_admin', 'WORKSPACE_PROJECT_ENVIRONMENT:READ+IMPORT', 'WORKSPACE_PROJECT_ENVIRONMENT'); insert into user_group_permission (id, group_id, permission_id, module_id) -values (uuid(), 'ws_admin', 'WORKSPACE_PROJECT_ENVIRONMENT:READ+EXPORT','WORKSPACE_PROJECT_ENVIRONMENT'); +values (uuid(), 'ws_admin', 'WORKSPACE_PROJECT_ENVIRONMENT:READ+EXPORT', 'WORKSPACE_PROJECT_ENVIRONMENT'); 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) diff --git a/backend/src/main/resources/permission.json b/backend/src/main/resources/permission.json index bfe9811cbe..b498cef2f3 100644 --- a/backend/src/main/resources/permission.json +++ b/backend/src/main/resources/permission.json @@ -149,6 +149,11 @@ "name": "编辑", "resourceId": "SYSTEM_AUTH" }, + { + "id": "SYSTEM_OPERATING_LOG:READ", + "name": "查询操作日志", + "resourceId": "SYSTEM_OPERATING_LOG" + }, { "id": "ORGANIZATION_USER:READ", "name": "查询成员", @@ -728,6 +733,10 @@ "id": "SYSTEM_AUTH", "name": "授权管理" }, + { + "id": "SYSTEM_OPERATING_LOG", + "name": "操作日志" + }, { "id": "ORGANIZATION_USER", "name": "成员" diff --git a/frontend/src/business/components/settings/organization/OrganizationMember.vue b/frontend/src/business/components/settings/organization/OrganizationMember.vue index 32e6c3b658..7b03610673 100644 --- a/frontend/src/business/components/settings/organization/OrganizationMember.vue +++ b/frontend/src/business/components/settings/organization/OrganizationMember.vue @@ -288,7 +288,7 @@ }) }, del(row) { - this.$confirm(this.$t('member.org_remove_member'), '', { + this.$confirm(this.$t('member.remove_member'), '', { confirmButtonText: this.$t('commons.confirm'), cancelButtonText: this.$t('commons.cancel'), type: 'warning' diff --git a/frontend/src/business/components/settings/router.js b/frontend/src/business/components/settings/router.js index c5ba4e7ccb..55b7e443e3 100644 --- a/frontend/src/business/components/settings/router.js +++ b/frontend/src/business/components/settings/router.js @@ -131,7 +131,7 @@ export default { { path: 'operatingLog', component: () => import('@/business/components/settings/operatinglog/OperatingLog'), - meta: {system: true, title: 'operating_log.title'} + meta: {system: true, title: 'operating_log.title', permissions: ['SYSTEM_OPERATING_LOG:READ']} } ] diff --git a/frontend/src/business/components/settings/system/group/UserGroup.vue b/frontend/src/business/components/settings/system/group/UserGroup.vue index 2475b8e8cc..ca9bc40b20 100644 --- a/frontend/src/business/components/settings/system/group/UserGroup.vue +++ b/frontend/src/business/components/settings/system/group/UserGroup.vue @@ -2,8 +2,8 @@