diff options
| author | Spp <spp@jorge.gr> | 2013-09-02 12:25:32 +0200 |
|---|---|---|
| committer | Spp <spp@jorge.gr> | 2013-09-02 12:25:32 +0200 |
| commit | eb73684952250de21db53588add498a4f0c25604 (patch) | |
| tree | b545feedce9d5a3498f27b436aaa01cdea5d7c44 /sql | |
| parent | 4219f45c8596b9c2b6ad094681f003ae09dca1bd (diff) | |
Core/RBAC: Move list commands to RBAC (using individual permissions)
Diffstat (limited to 'sql')
| -rw-r--r-- | sql/updates/auth/2013_09_02_13_auth_misc.sql | 23 | ||||
| -rw-r--r-- | sql/updates/world/2013_09_02_13_world_command.sql | 2 | ||||
| -rw-r--r-- | sql/updates/world/2013_09_02_14_world_command.sql | 11 |
3 files changed, 35 insertions, 1 deletions
diff --git a/sql/updates/auth/2013_09_02_13_auth_misc.sql b/sql/updates/auth/2013_09_02_13_auth_misc.sql new file mode 100644 index 00000000000..d370b3f959d --- /dev/null +++ b/sql/updates/auth/2013_09_02_13_auth_misc.sql @@ -0,0 +1,23 @@ +/* cs_list.cpp */ + +SET @id = 436; + +-- Add new permissions +DELETE FROM `rbac_permissions` WHERE `id` BETWEEN @id AND @id+5; +INSERT INTO `rbac_permissions` (`id`, `name`) VALUES +(@id+0, 'list'), +(@id+1, 'list creature'), +(@id+2, 'list item'), +(@id+3, 'list object'), +(@id+4, 'list auras'), +(@id+5, 'list mail'); + +-- Add permissions to "corresponding Commands Role" +DELETE FROM `rbac_role_permissions` WHERE `permissionId` BETWEEN @id AND @id+5; +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); diff --git a/sql/updates/world/2013_09_02_13_world_command.sql b/sql/updates/world/2013_09_02_13_world_command.sql index 55fff43aafb..0d5c6fdc545 100644 --- a/sql/updates/world/2013_09_02_13_world_command.sql +++ b/sql/updates/world/2013_09_02_13_world_command.sql @@ -1,4 +1,4 @@ -/* cs_learn.cpp */ +/* cs_lfg.cpp */ SET @id = 430; diff --git a/sql/updates/world/2013_09_02_14_world_command.sql b/sql/updates/world/2013_09_02_14_world_command.sql new file mode 100644 index 00000000000..08b092c7f0a --- /dev/null +++ b/sql/updates/world/2013_09_02_14_world_command.sql @@ -0,0 +1,11 @@ +/* cs_list.cpp */ + +SET @id = 436; + +-- Update command table with new RBAC permissions +UPDATE `command` SET `permission` = @id+0 WHERE `name` = 'list'; +UPDATE `command` SET `permission` = @id+1 WHERE `name` = 'list creature'; +UPDATE `command` SET `permission` = @id+2 WHERE `name` = 'list item'; +UPDATE `command` SET `permission` = @id+3 WHERE `name` = 'list object'; +UPDATE `command` SET `permission` = @id+4 WHERE `name` = 'list auras'; +UPDATE `command` SET `permission` = @id+5 WHERE `name` = 'list mail'); |
