diff options
Diffstat (limited to 'sql')
| -rw-r--r-- | sql/updates/auth/2013_08_30_01_auth_misc.sql | 28 | ||||
| -rw-r--r-- | sql/updates/world/2013_08_30_01_world_command.sql | 2 | ||||
| -rw-r--r-- | sql/updates/world/2013_08_30_04_world_command.sql | 14 |
3 files changed, 43 insertions, 1 deletions
diff --git a/sql/updates/auth/2013_08_30_01_auth_misc.sql b/sql/updates/auth/2013_08_30_01_auth_misc.sql new file mode 100644 index 00000000000..743551163ce --- /dev/null +++ b/sql/updates/auth/2013_08_30_01_auth_misc.sql @@ -0,0 +1,28 @@ +-- Add new permissions +DELETE FROM `rbac_permissions` WHERE `id` BETWEEN 200 AND 216; +INSERT INTO `rbac_permissions` (`id`, `name`) VALUES +(217, 'Command: .account'), +(218, 'Command: .account addon'), +(219, 'Command: .account create'), +(220, 'Command: .account delete'), +(221, 'Command: .account lock'), +(222, 'Command: .account lock country'), +(223, 'Command: .account lock ip'), +(224, 'Command: .account onlinelist'), +(225, 'Command: .account password'), +(226, 'Command: .account set'), +(227, 'Command: .account set addon'), +(228, 'Command: .account set gmlevel'), +(229, 'Command: .account set password'); + +-- Add Permissions to "corresponding Commands Role" +DELETE FROM `rbac_role_permissions` WHERE `permissionId` BETWEEN 217 AND 229; +INSERT INTO `rbac_role_permissions` (`roleId`, `permissionId`) VALUES +(1, 217), +(2, 218), +(1, 221), +(1, 222), +(1, 223), +(1, 225), +(4, 226), +(4, 227); diff --git a/sql/updates/world/2013_08_30_01_world_command.sql b/sql/updates/world/2013_08_30_01_world_command.sql index 89f83d7e424..e786c85a118 100644 --- a/sql/updates/world/2013_08_30_01_world_command.sql +++ b/sql/updates/world/2013_08_30_01_world_command.sql @@ -1,4 +1,4 @@ -ALTER TABLE `command` CHANGE `security` `permission` UNSIGNED SMALLINT(5) DEFAULT 0 NOT NULL; +ALTER TABLE `command` CHANGE `security` `permission` SMALLINT(5) UNSIGNED DEFAULT 0 NOT NULL; -- Player commands UPDATE `command` SET `permission` = 7 WHERE `permission` = 0; diff --git a/sql/updates/world/2013_08_30_04_world_command.sql b/sql/updates/world/2013_08_30_04_world_command.sql new file mode 100644 index 00000000000..c77f651f9e5 --- /dev/null +++ b/sql/updates/world/2013_08_30_04_world_command.sql @@ -0,0 +1,14 @@ +-- Update command table with new RBAC permissions +UPDATE `command` SET `permission` = 217 WHERE `name` = 'account'; +UPDATE `command` SET `permission` = 218 WHERE `name` = 'account addon'; +UPDATE `command` SET `permission` = 219 WHERE `name` = 'account create'; +UPDATE `command` SET `permission` = 220 WHERE `name` = 'account delete'; +UPDATE `command` SET `permission` = 221 WHERE `name` = 'account lock'; +UPDATE `command` SET `permission` = 222 WHERE `name` = 'account lock country'; +UPDATE `command` SET `permission` = 223 WHERE `name` = 'account lock ip'; +UPDATE `command` SET `permission` = 224 WHERE `name` = 'account onlinelist'; +UPDATE `command` SET `permission` = 225 WHERE `name` = 'account password'; +UPDATE `command` SET `permission` = 226 WHERE `name` = 'account set'; +UPDATE `command` SET `permission` = 227 WHERE `name` = 'account set addon'; +UPDATE `command` SET `permission` = 228 WHERE `name` = 'account set gmlevel'; +UPDATE `command` SET `permission` = 229 WHERE `name` = 'account set password'; |
