Core/RBAC: Create new permissions 'Allow to use CMSG_WORLD_TELEPORT opcode' and 'Allow to use CMSG_WHOIS opcode'

This commit is contained in:
Spp
2013-02-25 12:55:37 +01:00
parent e99dd15915
commit ea2e6052b2
3 changed files with 25 additions and 2 deletions

View File

@@ -0,0 +1,21 @@
-- Add new permissions
DELETE FROM `rbac_permissions` WHERE `id` IN (42, 43);
INSERT INTO `rbac_permissions` (`id`, `name`) VALUES
(42, 'Allows to use CMSG_WORLD_TELEPORT opcode'),
(43, 'Allows to use CMSG_WHOIS opcode');
-- Add new role
DELETE FROM `rbac_roles` WHERE `id` = 18;
INSERT INTO `rbac_roles` (`id`, `name`) VALUES
(18, 'Allows Admin Opcodes');
-- Add the permission to the role
DELETE FROM `rbac_role_permissions` WHERE `roleId` = 18;
INSERT INTO `rbac_role_permissions` (`roleId`, `permissionId`) VALUES
(18, 42),
(18, 43);
-- Add it to all GM+ groups
DELETE FROM `rbac_role_permissions` WHERE `roleId` = 18;
INSERT INTO `rbac_group_roles` (`groupId`, `roleId`) VALUES
(4, 18);