You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampark.apache.org by be...@apache.org on 2022/10/11 02:01:55 UTC

[incubator-streampark] branch dev updated: [Bug] Fix the missing data of the menu and add the sql that removes the admin role in the upgraded 1.2.4.sql #1794 (#1795)

This is an automated email from the ASF dual-hosted git repository.

benjobs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git


The following commit(s) were added to refs/heads/dev by this push:
     new 2cfbda5f9 [Bug] Fix the missing data of the menu and add the sql that removes the admin role in the upgraded 1.2.4.sql #1794 (#1795)
2cfbda5f9 is described below

commit 2cfbda5f94217447457c01bd06f8c797700199d8
Author: macksonmu <30...@qq.com>
AuthorDate: Tue Oct 11 10:01:49 2022 +0800

    [Bug] Fix the missing data of the menu and add the sql that removes the admin role in the upgraded 1.2.4.sql #1794 (#1795)
    
    Co-authored-by: macksonmu <ma...@gmail.com>
---
 .../src/assembly/script/upgrade/mysql/1.2.4.sql    | 26 +++++++++++++---------
 1 file changed, 16 insertions(+), 10 deletions(-)

diff --git a/streampark-console/streampark-console-service/src/assembly/script/upgrade/mysql/1.2.4.sql b/streampark-console/streampark-console-service/src/assembly/script/upgrade/mysql/1.2.4.sql
index f82426bc4..5eb853c54 100644
--- a/streampark-console/streampark-console-service/src/assembly/script/upgrade/mysql/1.2.4.sql
+++ b/streampark-console/streampark-console-service/src/assembly/script/upgrade/mysql/1.2.4.sql
@@ -115,16 +115,22 @@ alter table `t_menu` modify `modify_time` datetime not null default current_time
 alter table `t_role` modify `modify_time` datetime not null default current_timestamp on update current_timestamp;
 alter table `t_user` modify `modify_time` datetime not null default current_timestamp on update current_timestamp;
 
--- add permissions for user group management
-insert into `t_menu` values (100047, 100015, 'copy', null, null, 'app:copy', null, '1', '1', null, now(), now());
-
-
--- add permissions to admin
-insert into `t_role_menu` values (100062, 100000, 100043);
-insert into `t_role_menu` values (100063, 100000, 100044);
-insert into `t_role_menu` values (100064, 100000, 100045);
-insert into `t_role_menu` values (100065, 100000, 100046);
-insert into `t_role_menu` values (100066, 100000, 100047);
+-- add new modules to the menu
+insert into `t_menu` values (100043, 100015, 'copy', null, null, 'app:copy', null, 1, 1, null, now(), now());
+insert into `t_menu` values (100044, 100000, 'Team Management', '/system/team', 'system/team/Team', 'team:view', 'team', '0', 1, 2, now(), now());
+insert into `t_menu` values (100045, 100044, 'add', null, null, 'team:add', null, '1', 1, null, now(), now());
+insert into `t_menu` values (100046, 100044, 'update', null, null, 'team:update', null, '1', 1, null, now(), now());
+insert into `t_menu` values (100047, 100044, 'delete', null, null, 'team:delete', null, '1', 1, null, now(), now());
+insert into `t_menu` values (100048, 100000, 'Member Management', '/system/member', 'system/member/Member', 'member:view', 'usergroup-add', '0', 1, 2, now(), now());
+insert into `t_menu` values (100049, 100048, 'add', null, null, 'member:add', null, '1', 1, null, now(), now());
+insert into `t_menu` values (100050, 100048, 'update', null, null, 'member:update', null, '1', 1, null, now(), now());
+insert into `t_menu` values (100051, 100048, 'delete', null, null, 'member:delete', null, '1', 1, null, now(), now());
+insert into `t_menu` values (100052, 100048, 'role view', null, null, 'role:view', null, '1', 1, null, now(), now());
+insert into `t_menu` values (100053, 100001, 'types', null, null, 'user:types', null, '1', 1, null, now(), now());
+
+-- after adding team module, admin has all permissions by default, so admin does not need to add permissions separately, so delete admin related roles and associations
+delete from t_role_menu where role_id = 100000;
+delete from t_role where role_id = 100000;
 
 -- remove user table contact phone field
 alter table `t_user` drop column `mobile`;