diff options
| author | Spp <spp@jorge.gr> | 2013-09-10 15:26:48 +0200 |
|---|---|---|
| committer | Spp <spp@jorge.gr> | 2013-09-10 15:26:48 +0200 |
| commit | 78363e11b51c42c7f1d7a9598629531bb353a8ad (patch) | |
| tree | 18d29a890ccda5fced350a9be7160a289ba3ab64 /sql | |
| parent | b10241876e6c9d45fb1582bdcf553bcb24262df7 (diff) | |
Core/RBAC: Move titles and wp commands to RBAC (using individual permissions)
Diffstat (limited to 'sql')
| -rw-r--r-- | sql/updates/auth/2013_09_10_13_auth_misc.sql | 39 | ||||
| -rw-r--r-- | sql/updates/world/2013_09_10_15_world_command.sql | 25 |
2 files changed, 64 insertions, 0 deletions
diff --git a/sql/updates/auth/2013_09_10_13_auth_misc.sql b/sql/updates/auth/2013_09_10_13_auth_misc.sql new file mode 100644 index 00000000000..825028dcb5a --- /dev/null +++ b/sql/updates/auth/2013_09_10_13_auth_misc.sql @@ -0,0 +1,39 @@ +/* cs_titles.cpp & cs_wp.cpp */ + +SET @id = 761; + +-- Add new permissions +DELETE FROM `rbac_permissions` WHERE `id` BETWEEN @id AND @id+13; +INSERT INTO `rbac_permissions` (`id`, `name`) VALUES +(@id+0, 'titles'), +(@id+1, 'titles add'), +(@id+2, 'titles current'), +(@id+3, 'titles remove'), +(@id+4, 'titles set'), +(@id+5, 'titles set mask'), +(@id+6, 'titles wp'), +(@id+7, 'titles wp add'), +(@id+8, 'titles wp event'), +(@id+9, 'titles wp load'), +(@id+10, 'titles wp modify'), +(@id+11, 'titles wp unload'), +(@id+12, 'titles wp reload'), +(@id+13, 'titles wp show'); + +-- Add permissions to "corresponding Commands Role" +DELETE FROM `rbac_role_permissions` WHERE `permissionId` BETWEEN @id AND @id+13; +INSERT INTO `rbac_role_permissions` (`roleId`, `permissionId`) VALUES +(3, @id+0), +(3, @id+1), +(3, @id+2), +(3, @id+3), +(3, @id+4), +(3, @id+5), +(3, @id+6), +(3, @id+7), +(3, @id+8), +(3, @id+9), +(3, @id+10), +(3, @id+11), +(4, @id+12), +(3, @id+13); diff --git a/sql/updates/world/2013_09_10_15_world_command.sql b/sql/updates/world/2013_09_10_15_world_command.sql new file mode 100644 index 00000000000..f3601a3041b --- /dev/null +++ b/sql/updates/world/2013_09_10_15_world_command.sql @@ -0,0 +1,25 @@ +/* cs_titles.cpp & cs_wp.cpp */ + +SET @id = 761; + +-- Update command table with new RBAC permissions +UPDATE `command` SET `permission` = @id+0 WHERE `name` = 'tele'; +UPDATE `command` SET `permission` = @id+0 WHERE `name` = 'ticket'; +UPDATE `command` SET `permission` = @id+1 WHERE `name` = 'ticket assign'; +UPDATE `command` SET `permission` = @id+2 WHERE `name` = 'ticket close'; +UPDATE `command` SET `permission` = @id+3 WHERE `name` = 'ticket closedlist'; +UPDATE `command` SET `permission` = @id+4 WHERE `name` = 'ticket comment'; +UPDATE `command` SET `permission` = @id+5 WHERE `name` = 'ticket complete'; +UPDATE `command` SET `permission` = @id+6 WHERE `name` = 'ticket delete'; +UPDATE `command` SET `permission` = @id+7 WHERE `name` = 'ticket escalate'; +UPDATE `command` SET `permission` = @id+8 WHERE `name` = 'ticket escalatedlist'; +UPDATE `command` SET `permission` = @id+9 WHERE `name` = 'ticket list'; +UPDATE `command` SET `permission` = @id+10 WHERE `name` = 'ticket onlinelist'; +UPDATE `command` SET `permission` = @id+11 WHERE `name` = 'ticket reset'; +UPDATE `command` SET `permission` = @id+12 WHERE `name` = 'ticket response'; +UPDATE `command` SET `permission` = @id+13 WHERE `name` = 'ticket response append'; +UPDATE `command` SET `permission` = @id+14 WHERE `name` = 'ticket response appendln'; +UPDATE `command` SET `permission` = @id+15 WHERE `name` = 'ticket togglesystem'; +UPDATE `command` SET `permission` = @id+16 WHERE `name` = 'ticket unassign'; +UPDATE `command` SET `permission` = @id+17 WHERE `name` = 'ticket viewid'; +UPDATE `command` SET `permission` = @id+18 WHERE `name` = 'ticket viewname'; |
