diff options
| author | Spp <spp@jorge.gr> | 2013-09-10 15:01:39 +0200 |
|---|---|---|
| committer | Spp <spp@jorge.gr> | 2013-09-10 15:01:39 +0200 |
| commit | 68ab10ccd4b3358ddff4644a2350906d598b2424 (patch) | |
| tree | 3e98867fcd951bac7cc6ac61703c0db9bd9d3cdb /sql/updates | |
| parent | abbc6b2760a0f8117761e303c999f375c9ab4317 (diff) | |
Core/RBAC: Move tele commands to RBAC (using individual permissions)
Diffstat (limited to 'sql/updates')
| -rw-r--r-- | sql/updates/auth/2013_09_10_11_auth_misc.sql | 20 | ||||
| -rw-r--r-- | sql/updates/world/2013_09_10_13_world_command.sql | 10 |
2 files changed, 30 insertions, 0 deletions
diff --git a/sql/updates/auth/2013_09_10_11_auth_misc.sql b/sql/updates/auth/2013_09_10_11_auth_misc.sql new file mode 100644 index 00000000000..011f1219547 --- /dev/null +++ b/sql/updates/auth/2013_09_10_11_auth_misc.sql @@ -0,0 +1,20 @@ +/* cs_tele.cpp */ + +SET @id = 737; + +-- Add new permissions +DELETE FROM `rbac_permissions` WHERE `id` BETWEEN @id AND @id+4; +INSERT INTO `rbac_permissions` (`id`, `name`) VALUES +(@id+0, 'tele'), +(@id+1, 'tele add'), +(@id+2, 'tele del'), +(@id+3, 'tele name'), +(@id+4, 'tele group'); + +-- Add permissions to "corresponding Commands Role" +DELETE FROM `rbac_role_permissions` WHERE `permissionId` BETWEEN @id AND @id+4; +INSERT INTO `rbac_role_permissions` (`roleId`, `permissionId`) VALUES +(4, @id+0), +(4, @id+1), +(4, @id+3), +(4, @id+4); diff --git a/sql/updates/world/2013_09_10_13_world_command.sql b/sql/updates/world/2013_09_10_13_world_command.sql new file mode 100644 index 00000000000..a81b90f21bb --- /dev/null +++ b/sql/updates/world/2013_09_10_13_world_command.sql @@ -0,0 +1,10 @@ +/* cs_tele.cpp */ + +SET @id = 737; + +-- Update command table with new RBAC permissions +UPDATE `command` SET `permission` = @id+0 WHERE `name` = 'tele'; +UPDATE `command` SET `permission` = @id+1 WHERE `name` = 'tele add'; +UPDATE `command` SET `permission` = @id+2 WHERE `name` = 'tele del'; +UPDATE `command` SET `permission` = @id+3 WHERE `name` = 'tele name'; +UPDATE `command` SET `permission` = @id+4 WHERE `name` = 'tele group'; |
