From 90302ad9aad6d0c4b87021a2c314b4247143a89c Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Tue, 25 Oct 2022 10:25:44 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE):=20?= =?UTF-8?q?=E6=9D=83=E9=99=90=E5=88=9D=E5=A7=8B=E5=8C=96sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/db/migration/V131__2.3.0__release.sql | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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 9b984e950f..8f4aa089dc 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 @@ -13,17 +13,20 @@ INSERT INTO system_parameter (param_key, param_value, type, sort) VALUES ('base. DELETE FROM user_group_permission WHERE permission_id = 'WORKSPACE_PROJECT_MANAGER:READ+UPLOAD_JAR'; +-- 已有READ权限的工作空间类型的用户组,添加该权限 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'; +WHERE type = 'WORKSPACE' + AND `group`.id IN + (SELECT group_id FROM user_group_permission WHERE permission_id = 'WORKSPACE_PROJECT_MANAGER:READ'); 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'); + AND `group`.id IN (SELECT group_id FROM user_group_permission WHERE permission_id = 'PROJECT_MESSAGE:READ'); @@ -31,5 +34,5 @@ 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 + 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