diff --git a/src/main/resources/sql/20190521/http_manipulation.sql b/src/main/resources/sql/20190521/http_manipulation.sql index 0ce72718b..8e50226af 100644 --- a/src/main/resources/sql/20190521/http_manipulation.sql +++ b/src/main/resources/sql/20190521/http_manipulation.sql @@ -20,10 +20,10 @@ INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_re insert into sys_privilege (PRIVILEGE_MASTER,PRIVILEGE_MASTER_VALUE,PRIVILEGE_ACCESS,PRIVILEGE_ACCESS_VALUE,PRIVILEGE_OPERATION ) select 'ROLE',r.id,1000,m.id,1 from sys_role r,sys_menu m where r.name='admin' and m.code in ('http_manipulation'); #TODO 删除service、region字典*****************确认是否删除server_conf.xml -#update function_region_dict set is_Valid=0 where function_id in(207,208,209) and is_valid=1; -#update function_service_dict set is_Valid=0 where function_id in(207,208,209) and is_valid=1; +#update function_region_dict set is_Valid=0 where function_id in(208,209) and is_valid=1; +#update function_service_dict set is_Valid=0 where function_id in(208,209) and is_valid=1; #TODO 删除非ceiec用户之外的replace、redirect、block(配置、日志、统计)权限*****************此步骤需要确认 -#delete from sys_privilege t where t.PRIVILEGE_ACCESS_VALUE in(SELECT id FROM sys_menu WHERE CODE IN ('http_block','http_redirect','http_replace') AND IS_SHOW=1 AND del_flag=1) and t.PRIVILEGE_MASTER_VALUE <> 1; +#delete from sys_privilege t where t.PRIVILEGE_ACCESS_VALUE in(SELECT id FROM sys_menu WHERE CODE IN ('http_redirect','http_replace') AND IS_SHOW=1 AND del_flag=1) and t.PRIVILEGE_MASTER_VALUE <> 1; #TODO 需要确认旧的数据是否需要更新为最新需求格式,提供更新SQL. diff --git a/src/main/resources/sql/20190527/DDOS_ADD_MENU.sql b/src/main/resources/sql/20190527/DDOS_ADD_MENU.sql new file mode 100644 index 000000000..a6686cc8e --- /dev/null +++ b/src/main/resources/sql/20190527/DDOS_ADD_MENU.sql @@ -0,0 +1,17 @@ +#统计菜单,新增一个其他系统的统计菜单 +INSERT INTO `sys_menu`(`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES (780, '0,1,780,', 'other_system_ddos_report_menu', '目标IP防护', 50, 'http://192.168.10.194:8888/webSev/index.html', '', 'fa fa-exclamation-triangle', 1, '', '1', '2018-07-18 10:53:19', '1', '2018-10-09 17:48:20', '', 1, NULL, 0, 0, null); +#日志菜单,ddos新加一个菜单,修改旧的菜单为父级菜单 +update sys_menu set href='',icon='',function_id=null,code='ddos_log' where id=801; +INSERT INTO `sys_menu`(`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) +VALUES (801, '0,1,152,801,', 'target_ip_protect', '常用DDOS攻击', 6, '/log/ntc/ntcDdosLogs/list', '', 'fa fa-exclamation-triangle', 1, '', '1', '2018-07-11 17:52:12', '1', '2018-11-14 10:56:40', '', 1, '', 0, 0, 301); +INSERT INTO `sys_menu`( `parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) +VALUES ( 801, '0,1,152,801,', 'other_system_ddos_log_menu', '其他系统菜单', 5060, 'http://192.168.10.194:8888/webSev/index.html', 'mainFrame', '', 1, '', '1', '2019-05-24 16:36:25', '1', '2019-05-24 16:38:03', 'ddos测试内嵌页面', 1, NULL, 0, 0, NULL); + +#为admin角色分配新的ddos的日志和统计菜单权限 +insert into sys_privilege (PRIVILEGE_MASTER,PRIVILEGE_MASTER_VALUE,PRIVILEGE_ACCESS,PRIVILEGE_ACCESS_VALUE,PRIVILEGE_OPERATION ) select 'ROLE',r.id,1000,m.id,1 from sys_role r,sys_menu m where r.name='admin' and m.code in ('target_ip_protect','other_system_ddos_log_menu','other_system_ddos_report_menu') and m.is_show=1 and m.del_flag=1 and m.permission =''; + +#为所有拥有ddos菜单权限的角色分配target_ip_protect菜单 +insert into sys_privilege (PRIVILEGE_MASTER,PRIVILEGE_MASTER_VALUE,PRIVILEGE_ACCESS,PRIVILEGE_ACCESS_VALUE,PRIVILEGE_OPERATION ) select p.PRIVILEGE_MASTER,p.PRIVILEGE_MASTER_VALUE,p.PRIVILEGE_ACCESS,m.id,p.PRIVILEGE_OPERATION from sys_privilege p, sys_menu m where p.PRIVILEGE_ACCESS_VALUE=801 and m.`code`='target_ip_protect' and m.is_show=1 and m.del_flag=1 and m.permission ='' and m.parent_id=801; + + +