mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 02:25:38 +01:00
Core/RBAC: Move pet commands to RBAC (using individual permissions)
- Pet commands moved from cs_misc.cpp to own file
This commit is contained in:
19
sql/updates/auth/2013_09_10_01_auth_misc.sql
Normal file
19
sql/updates/auth/2013_09_10_01_auth_misc.sql
Normal file
@@ -0,0 +1,19 @@
|
||||
/* cs_pet.cpp */
|
||||
|
||||
SET @id = 472;
|
||||
|
||||
-- Add new permissions
|
||||
DELETE FROM `rbac_permissions` WHERE `id` BETWEEN @id AND @id+3;
|
||||
INSERT INTO `rbac_permissions` (`id`, `name`) VALUES
|
||||
(@id+0 , 'pet'),
|
||||
(@id+1 , 'pet create'),
|
||||
(@id+2 , 'pet learn'),
|
||||
(@id+3 , 'pet unlearn');
|
||||
|
||||
-- Add permissions to "corresponding Commands Role"
|
||||
DELETE FROM `rbac_role_permissions` WHERE `permissionId` BETWEEN @id AND @id+3;
|
||||
INSERT INTO `rbac_role_permissions` (`roleId`, `permissionId`) VALUES
|
||||
(2, @id+0),
|
||||
(2, @id+1),
|
||||
(2, @id+2),
|
||||
(2, @id+3);
|
||||
9
sql/updates/world/2013_09_10_02_world_command.sql
Normal file
9
sql/updates/world/2013_09_10_02_world_command.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
/* cs_pet.cpp */
|
||||
|
||||
SET @id = 479;
|
||||
|
||||
-- Update command table with new RBAC permissions
|
||||
UPDATE `command` SET `permission` = @id+0 WHERE `name` = 'pet';
|
||||
UPDATE `command` SET `permission` = @id+1 WHERE `name` = 'pet create';
|
||||
UPDATE `command` SET `permission` = @id+2 WHERE `name` = 'pet learn';
|
||||
UPDATE `command` SET `permission` = @id+3 WHERE `name` = 'pet unlearn';
|
||||
Reference in New Issue
Block a user