odf_new/sql/v1.0.2.1/02_add_fault_add_edit_permissions.sql
zpc 1c1b9ef559
All checks were successful
continuous-integration/drone/push Build is passing
21
2026-04-06 16:13:45 +08:00

25 lines
1.3 KiB
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- =============================================
-- 干线故障权限修复:新增 odfcablefaults:add 和 odfcablefaults:edit 菜单按钮
-- 并分配给角色2本部门及以下可编辑权限和角色3编辑角色
-- 角色4查看权限不分配仅保留 list/query
-- =============================================
-- 1. 插入新增和修改菜单按钮ParentId=11200 即干线故障管理)
SET IDENTITY_INSERT sys_menu ON;
INSERT INTO sys_menu (MenuId, MenuName, ParentId, OrderNum, MenuType, perms, Status, IsFrame, IsCache, Visible, Create_by, Create_time)
VALUES (11223, N'新增', 11200, 2, 'F', 'odfcablefaults:add', 0, 1, 0, '0', 'admin', GETDATE());
INSERT INTO sys_menu (MenuId, MenuName, ParentId, OrderNum, MenuType, perms, Status, IsFrame, IsCache, Visible, Create_by, Create_time)
VALUES (11224, N'修改', 11200, 3, 'F', 'odfcablefaults:edit', 0, 1, 0, '0', 'admin', GETDATE());
SET IDENTITY_INSERT sys_menu OFF;
-- 2. 角色2本部门及以下可编辑权限分配新增和修改权限
INSERT INTO sys_role_menu (Role_id, Menu_id) VALUES (2, 11223);
INSERT INTO sys_role_menu (Role_id, Menu_id) VALUES (2, 11224);
-- 3. 角色3编辑角色分配新增和修改权限
INSERT INTO sys_role_menu (Role_id, Menu_id) VALUES (3, 11223);
INSERT INTO sys_role_menu (Role_id, Menu_id) VALUES (3, 11224);