diff options
| author | Spp <spp@jorge.gr> | 2013-08-30 16:26:52 +0200 |
|---|---|---|
| committer | Spp <spp@jorge.gr> | 2013-08-30 16:26:52 +0200 |
| commit | 9bea4fc4515b556fc69412cccc3c3f186553fe7b (patch) | |
| tree | 541894972436b1b0a4166f18889e21dd58b59b62 /sql | |
| parent | 2b69f83823af84da08be5888185b6da14742c387 (diff) | |
Core/RBAC: Move ban commands to RBAC (using individual permissions)
Diffstat (limited to 'sql')
| -rw-r--r-- | sql/updates/auth/2013_08_30_03_auth_misc.sql | 43 | ||||
| -rw-r--r-- | sql/updates/world/2013_08_30_06_world_command.sql | 19 |
2 files changed, 62 insertions, 0 deletions
diff --git a/sql/updates/auth/2013_08_30_03_auth_misc.sql b/sql/updates/auth/2013_08_30_03_auth_misc.sql new file mode 100644 index 00000000000..a6495a2de6e --- /dev/null +++ b/sql/updates/auth/2013_08_30_03_auth_misc.sql @@ -0,0 +1,43 @@ +-- Add new permissions +DELETE FROM `rbac_permissions` WHERE `id` BETWEEN 239 AND 256; +INSERT INTO `rbac_permissions` (`id`, `name`) VALUES +(239, 'ban'), +(240, 'ban account'), +(241, 'ban character'), +(242, 'ban ip'), +(243, 'ban playeraccount'), +(244, 'baninfo'), +(245, 'baninfo account'), +(246, 'baninfo character'), +(247, 'baninfo ip'), +(248, 'banlist'), +(249, 'banlist account'), +(250, 'banlist character'), +(251, 'banlist ip'), +(252, 'unban'), +(253, 'unban account'), +(254, 'unban character'), +(255, 'unban ip'), +(256, 'unban playeraccount'); + +-- Add Permissions to "corresponding Commands Role" +DELETE FROM `rbac_role_permissions` WHERE `permissionId` BETWEEN 239 AND 256; +INSERT INTO `rbac_role_permissions` (`roleId`, `permissionId`) VALUES +(4, 239), +(4, 240), +(4, 241), +(4, 242), +(4, 243), +(4, 244), +(4, 245), +(4, 246), +(4, 247), +(4, 248), +(4, 249), +(4, 250), +(4, 251), +(4, 252), +(4, 253), +(4, 254), +(4, 255), +(4, 256); diff --git a/sql/updates/world/2013_08_30_06_world_command.sql b/sql/updates/world/2013_08_30_06_world_command.sql new file mode 100644 index 00000000000..777319613ce --- /dev/null +++ b/sql/updates/world/2013_08_30_06_world_command.sql @@ -0,0 +1,19 @@ +-- Update command table with new RBAC permissions +UPDATE `command` SET `permission` = 239 WHERE `name` = 'ban'; +UPDATE `command` SET `permission` = 240 WHERE `name` = 'ban account'; +UPDATE `command` SET `permission` = 241 WHERE `name` = 'ban character'; +UPDATE `command` SET `permission` = 242 WHERE `name` = 'ban ip'; +UPDATE `command` SET `permission` = 243 WHERE `name` = 'ban playeraccount'; +UPDATE `command` SET `permission` = 244 WHERE `name` = 'baninfo'; +UPDATE `command` SET `permission` = 245 WHERE `name` = 'baninfo account'; +UPDATE `command` SET `permission` = 246 WHERE `name` = 'baninfo character'; +UPDATE `command` SET `permission` = 247 WHERE `name` = 'baninfo ip'; +UPDATE `command` SET `permission` = 248 WHERE `name` = 'banlist'; +UPDATE `command` SET `permission` = 249 WHERE `name` = 'banlist account'; +UPDATE `command` SET `permission` = 250 WHERE `name` = 'banlist character'; +UPDATE `command` SET `permission` = 251 WHERE `name` = 'banlist ip'; +UPDATE `command` SET `permission` = 252 WHERE `name` = 'unban'; +UPDATE `command` SET `permission` = 253 WHERE `name` = 'unban account'; +UPDATE `command` SET `permission` = 254 WHERE `name` = 'unban character'; +UPDATE `command` SET `permission` = 255 WHERE `name` = 'unban ip'; +UPDATE `command` SET `permission` = 256 WHERE `name` = 'unban playeraccount'; |
