diff options
Diffstat (limited to 'sql')
| -rw-r--r-- | sql/updates/auth/2013_08_30_00_auth_misc.sql | 40 | ||||
| -rw-r--r-- | sql/updates/world/2013_08_30_02_world_command.sql | 17 |
2 files changed, 57 insertions, 0 deletions
diff --git a/sql/updates/auth/2013_08_30_00_auth_misc.sql b/sql/updates/auth/2013_08_30_00_auth_misc.sql new file mode 100644 index 00000000000..1f51a8deee8 --- /dev/null +++ b/sql/updates/auth/2013_08_30_00_auth_misc.sql @@ -0,0 +1,40 @@ +-- Add new permissions +DELETE FROM `rbac_permissions` WHERE `id` BETWEEN 200 AND 216; +INSERT INTO `rbac_permissions` (`id`, `name`) VALUES +(200, 'Command: .rbac'), +(201, 'Command: .rbac account'), +(202, 'Command: .rbac account group'), +(203, 'Command: .rbac account group add'), +(204, 'Command: .rbac account group remove'), +(205, 'Command: .rbac account role'), +(206, 'Command: .rbac account role grant'), +(207, 'Command: .rbac account role deny'), +(208, 'Command: .rbac account role revoke'), +(209, 'Command: .rbac account permission'), +(210, 'Command: .rbac account permission grant'), +(211, 'Command: .rbac account permission deny'), +(212, 'Command: .rbac account permission revoke'), +(213, 'Command: .rbac list'), +(214, 'Command: .rbac list groups'), +(215, 'Command: .rbac list roles'), +(216, 'Command: .rbac list permissions'); + +-- Add Permissions to "Administrator Commands Role" +DELETE FROM `rbac_role_permissions` WHERE `roleId` = 4 AND `permissionId` BETWEEN 200 AND 216; +INSERT INTO `rbac_role_permissions` (`roleId`, `permissionId`) VALUES +(4, 200), +(4, 201), +(4, 202), +(4, 203), +(4, 204), +(4, 205), +(4, 206), +(4, 207), +(4, 208), +(4, 209), +(4, 210), +(4, 211), +(4, 213), +(4, 214), +(4, 215), +(4, 216); diff --git a/sql/updates/world/2013_08_30_02_world_command.sql b/sql/updates/world/2013_08_30_02_world_command.sql new file mode 100644 index 00000000000..1b0f1a2a663 --- /dev/null +++ b/sql/updates/world/2013_08_30_02_world_command.sql @@ -0,0 +1,17 @@ +-- Update command table with new RBAC permissions +UPDATE `command` SET `permission` = 200 WHERE `name` = '.rbac'; +UPDATE `command` SET `permission` = 201 WHERE `name` = '.rbac account'; +UPDATE `command` SET `permission` = 202 WHERE `name` = '.rbac account group'; +UPDATE `command` SET `permission` = 203 WHERE `name` = '.rbac account group add'; +UPDATE `command` SET `permission` = 204 WHERE `name` = '.rbac account group remove'; +UPDATE `command` SET `permission` = 205 WHERE `name` = '.rbac account role'; +UPDATE `command` SET `permission` = 206 WHERE `name` = '.rbac account role grant'; +UPDATE `command` SET `permission` = 207 WHERE `name` = '.rbac account role deny'; +UPDATE `command` SET `permission` = 208 WHERE `name` = '.rbac account role revoke'; +UPDATE `command` SET `permission` = 209 WHERE `name` = '.rbac account permission'; +UPDATE `command` SET `permission` = 210 WHERE `name` = '.rbac account permission grant'; +UPDATE `command` SET `permission` = 211 WHERE `name` = '.rbac account permission deny'; +UPDATE `command` SET `permission` = 212 WHERE `name` = '.rbac account permission revoke'; +UPDATE `command` SET `permission` = 214 WHERE `name` = '.rbac account list groups'; +UPDATE `command` SET `permission` = 215 WHERE `name` = '.rbac account list roles'; +UPDATE `command` SET `permission` = 216 WHERE `name` = '.rbac account list permissions'; |
