diff options
| author | Spp <spp@jorge.gr> | 2013-09-10 11:45:59 +0200 |
|---|---|---|
| committer | Spp <spp@jorge.gr> | 2013-09-10 11:45:59 +0200 |
| commit | 1eee42433b429db690d1fd90513e021d9431c49e (patch) | |
| tree | c56168d5dfba25f1da8b309f6f39a9ca13553374 /sql | |
| parent | f2121b12c03d90d666c08f5998262af5523e2ffc (diff) | |
Core/RBAC: Move group commands to RBAC (using individual permissions)
- group commands moved from cs_misc.cpp to own file
- renamed groupsummon to "group summon"
Diffstat (limited to 'sql')
| -rw-r--r-- | sql/updates/auth/2013_09_10_00_auth_misc.sql | 25 | ||||
| -rw-r--r-- | sql/updates/world/2013_09_10_01_world_command.sql | 15 |
2 files changed, 40 insertions, 0 deletions
diff --git a/sql/updates/auth/2013_09_10_00_auth_misc.sql b/sql/updates/auth/2013_09_10_00_auth_misc.sql new file mode 100644 index 00000000000..f62ecd83cab --- /dev/null +++ b/sql/updates/auth/2013_09_10_00_auth_misc.sql @@ -0,0 +1,25 @@ +/* cs_group.cpp */ + +SET @id = 472; + +-- Add new permissions +DELETE FROM `rbac_permissions` WHERE `id` BETWEEN @id AND @id+6; +INSERT INTO `rbac_permissions` (`id`, `name`) VALUES +(@id+0 , 'group'), +(@id+1 , 'group leader'), +(@id+2 , 'group disband'), +(@id+3 , 'group remove'), +(@id+4 , 'group join'), +(@id+5 , 'group list'), +(@id+6 , 'group summon'); + +-- Add permissions to "corresponding Commands Role" +DELETE FROM `rbac_role_permissions` WHERE `permissionId` BETWEEN @id AND @id+6; +INSERT INTO `rbac_role_permissions` (`roleId`, `permissionId`) VALUES +(4, @id+0), +(4, @id+1), +(4, @id+2), +(4, @id+3), +(4, @id+4), +(4, @id+5), +(4, @id+6); diff --git a/sql/updates/world/2013_09_10_01_world_command.sql b/sql/updates/world/2013_09_10_01_world_command.sql new file mode 100644 index 00000000000..3c287422cac --- /dev/null +++ b/sql/updates/world/2013_09_10_01_world_command.sql @@ -0,0 +1,15 @@ +/* cs_group.cpp */ + +SET @id = 472; + +-- Update command table with new RBAC permissions +UPDATE `command` SET `permission` = @id+0 WHERE `name` = 'group'; +UPDATE `command` SET `permission` = @id+1 WHERE `name` = 'group leader'; +UPDATE `command` SET `permission` = @id+2 WHERE `name` = 'group disband'; +UPDATE `command` SET `permission` = @id+3 WHERE `name` = 'group remove'; +UPDATE `command` SET `permission` = @id+4 WHERE `name` = 'group join'; +UPDATE `command` SET `permission` = @id+5 WHERE `name` = 'group list'; + +UPDATE `command` SET `permission` = @id+6, `name` = 'group summon', `help` = +'Syntax: .group summon [$charactername]\r\n\r\nTeleport the given character and his group to you. Teleported only online characters but original selected group member can be offline.' +WHERE `name` = 'groupsummon'; |
