From 21cce1ab0e5c8f91cd00fbade437bd2708651332 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Mon, 24 Oct 2022 18:59:32 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE):=20?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=BB=84=E5=92=8C=E6=9D=83=E9=99=90-?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86=E5=91=98=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E7=BB=84=E7=9A=84=E6=9D=83=E9=99=90=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1018496 --user=李玉号 【系统设置】用户组和权限-项目管理员用户组的权限修改汇总 https://www.tapd.cn/55049933/s/1275139 --- .../notification/NotificationTable.vue | 2 +- .../sdk-parent/frontend/src/i18n/lang/en-US.js | 2 ++ .../sdk-parent/frontend/src/i18n/lang/zh-CN.js | 10 ++++++---- .../sdk-parent/frontend/src/i18n/lang/zh-TW.js | 4 +++- .../backend/src/main/resources/permission.json | 11 +++++++++++ .../components/base/ErrorReportLibraryList.vue | 2 +- .../db/migration/V131__2.3.0__release.sql | 16 ++++++++++++++++ 7 files changed, 40 insertions(+), 7 deletions(-) diff --git a/framework/sdk-parent/frontend/src/components/notification/NotificationTable.vue b/framework/sdk-parent/frontend/src/components/notification/NotificationTable.vue index df8f4e9fbd..a72efec288 100644 --- a/framework/sdk-parent/frontend/src/components/notification/NotificationTable.vue +++ b/framework/sdk-parent/frontend/src/components/notification/NotificationTable.vue @@ -113,7 +113,7 @@ v-show="!scope.row.isSet" @click="deleteRowTask(scope.$index,scope.row)" :tip="$t('commons.delete')" - v-permission="['PROJECT_MESSAGE:READ+EDIT']"/> + v-permission="['PROJECT_MESSAGE:READ+DELETE']"/> diff --git a/framework/sdk-parent/frontend/src/i18n/lang/en-US.js b/framework/sdk-parent/frontend/src/i18n/lang/en-US.js index 8bb1e6f724..95384e2636 100644 --- a/framework/sdk-parent/frontend/src/i18n/lang/en-US.js +++ b/framework/sdk-parent/frontend/src/i18n/lang/en-US.js @@ -2501,6 +2501,7 @@ const message = { create: "CREATE", edit: "EDIT", delete: "DELETE", + batch_delete: "BATCH DELETE", }, system_user: { name: "User", @@ -2573,6 +2574,7 @@ const message = { name: "Message", read: "READ", edit: "EDIT", + delete: "DELETE" }, project_template: { name: "Template", diff --git a/framework/sdk-parent/frontend/src/i18n/lang/zh-CN.js b/framework/sdk-parent/frontend/src/i18n/lang/zh-CN.js index 3da8406b42..f0ef07581b 100644 --- a/framework/sdk-parent/frontend/src/i18n/lang/zh-CN.js +++ b/framework/sdk-parent/frontend/src/i18n/lang/zh-CN.js @@ -2509,6 +2509,7 @@ const message = { create: "创建误报", edit: "修改误报", delete: "刪除误报", + batch_delete: "批量刪除误报", }, system_user: { name: "用户", @@ -2580,7 +2581,8 @@ const message = { project_message: { name: "消息设置", read: "查询", - edit: "编辑" + edit: "编辑", + delete: "删除" }, project_template: { name: "模版设置", @@ -2588,7 +2590,7 @@ const message = { case_template: "用例模版", issue_template: "缺陷模版", api_template: "接口模版", - custom: "自定义字段" + custom: "模版字段" }, workspace_project_manager: { name: "项目管理", @@ -2638,7 +2640,7 @@ const message = { setting_permission: "设置权限", }, project_environment: { - name: "环境设置", + name: "项目环境", read: "查询环境", create: "创建环境", edit: "编辑环境", @@ -2699,7 +2701,7 @@ const message = { }, project_app_manager: { - name: "应用设置", + name: "应用管理", edit: "编辑应用设置" }, project_track_plan: { diff --git a/framework/sdk-parent/frontend/src/i18n/lang/zh-TW.js b/framework/sdk-parent/frontend/src/i18n/lang/zh-TW.js index dad6bb33c3..c3d202bc9c 100644 --- a/framework/sdk-parent/frontend/src/i18n/lang/zh-TW.js +++ b/framework/sdk-parent/frontend/src/i18n/lang/zh-TW.js @@ -2506,6 +2506,7 @@ const message = { create: "創建誤報", edit: "修改誤報", delete: "刪除誤報", + batch_delete: "批量刪除誤報", }, system_user: { name: "用戶", @@ -2577,7 +2578,8 @@ const message = { project_message: { name: "消息設置", read: "查詢", - edit: "編輯" + edit: "編輯", + delete: "刪除" }, project_template: { name: "模版設置", diff --git a/project-management/backend/src/main/resources/permission.json b/project-management/backend/src/main/resources/permission.json index b2995f868c..58ef428bad 100644 --- a/project-management/backend/src/main/resources/permission.json +++ b/project-management/backend/src/main/resources/permission.json @@ -170,6 +170,11 @@ "name": "permission.project_message.edit", "resourceId": "PROJECT_MESSAGE" }, + { + "id": "PROJECT_MESSAGE:READ+DELETE", + "name": "permission.project_message.delete", + "resourceId": "PROJECT_MESSAGE" + }, { "id": "PROJECT_CUSTOM_CODE:READ", "name": "permission.project_custom_code.read", @@ -248,6 +253,12 @@ "name": "permission.project_error_report_library.delete", "resourceId": "PROJECT_ERROR_REPORT_LIBRARY", "license": true + }, + { + "id": "PROJECT_ERROR_REPORT_LIBRARY:READ+BATCH_DELETE", + "name": "permission.project_error_report_library.batch_delete", + "resourceId": "PROJECT_ERROR_REPORT_LIBRARY", + "license": true } ], "resource": [ diff --git a/project-management/frontend/src/business/menu/errorreportlibrary/components/base/ErrorReportLibraryList.vue b/project-management/frontend/src/business/menu/errorreportlibrary/components/base/ErrorReportLibraryList.vue index 0355071ddf..d111b6687e 100644 --- a/project-management/frontend/src/business/menu/errorreportlibrary/components/base/ErrorReportLibraryList.vue +++ b/project-management/frontend/src/business/menu/errorreportlibrary/components/base/ErrorReportLibraryList.vue @@ -124,7 +124,7 @@ export default { buttons: [{ name: this.$t('api_test.definition.request.batch_delete'), handleClick: this.handleBatchDelete, - permissions: ['PROJECT_ERROR_REPORT_LIBRARY:READ+DELETE'] + permissions: ['PROJECT_ERROR_REPORT_LIBRARY:READ+BATCH_DELETE'] }], selectNodeIds: [], screenHeight: 'calc(100vh - 150px)',//屏幕高度 diff --git a/system-setting/backend/src/main/resources/db/migration/V131__2.3.0__release.sql b/system-setting/backend/src/main/resources/db/migration/V131__2.3.0__release.sql index 651fd74ad4..4db2b101b5 100644 --- a/system-setting/backend/src/main/resources/db/migration/V131__2.3.0__release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V131__2.3.0__release.sql @@ -17,3 +17,19 @@ INSERT INTO user_group_permission (id, group_id, permission_id, module_id) SELECT UUID(), id, 'WORKSPACE_PROJECT_MANAGER:READ+ENVIRONMENT_CONFIG', 'WORKSPACE_PROJECT_MANAGER' FROM `group` WHERE type = 'WORKSPACE'; + + +INSERT INTO user_group_permission (id, group_id, permission_id, module_id) +SELECT UUID(), id, 'PROJECT_MESSAGE:READ+DELETE', 'PROJECT_MESSAGE' +FROM `group` +WHERE type = 'PROJECT' + and `group`.id in (select group_id from user_group_permission where permission_id = 'PROJECT_MESSAGE:READ'); + + + +INSERT INTO user_group_permission (id, group_id, permission_id, module_id) +SELECT UUID(), id, 'PROJECT_ERROR_REPORT_LIBRARY:READ+BATCH_DELETE', 'PROJECT_ERROR_REPORT_LIBRARY' +FROM `group` +WHERE type = 'PROJECT' + and `group`.id in + (select group_id from user_group_permission where permission_id = 'PROJECT_ERROR_REPORT_LIBRARY:READ'); \ No newline at end of file