Core/RBAC: Create new permissions 'Use staff badge in chat' and 'Check if should appear in .gm ingame command'

This commit is contained in:
Spp
2013-02-25 12:36:20 +01:00
parent 8e3944bd94
commit 367d3ccc4f
3 changed files with 55 additions and 22 deletions

View File

@@ -0,0 +1,27 @@
-- Add new permissions
DELETE FROM `rbac_permissions` WHERE `id` IN (34, 37);
INSERT INTO `rbac_permissions` (`id`, `name`) VALUES
(34, 'Check if shoul appear in list using .gm ingame command'),
(37, 'Use staff badge in chat');
-- Add new role
DELETE FROM `rbac_roles` WHERE `id` IN (14, 15);
INSERT INTO `rbac_roles` (`id`, `name`) VALUES
(14, 'Appear in GM ingame list'),
(15, 'Use staff badge in chat');
-- Add the permission to the role
DELETE FROM `rbac_role_permissions` WHERE `roleId` IN (14, 15);
INSERT INTO `rbac_role_permissions` (`roleId`, `permissionId`) VALUES
(14, 34),
(15, 37);
-- Add it to all GM+ groups
DELETE FROM `rbac_role_permissions` WHERE `roleId` IN (14, 15);
INSERT INTO `rbac_group_roles` (`groupId`, `roleId`) VALUES
(2, 14),
(3, 14),
(4, 14),
(2, 15),
(3, 15),
(4, 15);