diff options
| author | Spp <spp@jorge.gr> | 2013-09-02 12:17:46 +0200 |
|---|---|---|
| committer | Spp <spp@jorge.gr> | 2013-09-02 12:17:46 +0200 |
| commit | 4219f45c8596b9c2b6ad094681f003ae09dca1bd (patch) | |
| tree | c596f829a4c8562d1500efd01def2b6d78df1424 /sql/updates | |
| parent | c0dfdeab1c24e9435f7aad37a7c2b50e08b0d37f (diff) | |
Core/RBAC: Move lfg commands to RBAC (using individual permissions)
Diffstat (limited to 'sql/updates')
| -rw-r--r-- | sql/updates/auth/2013_09_02_12_auth_misc.sql | 23 | ||||
| -rw-r--r-- | sql/updates/world/2013_09_02_13_world_command.sql | 11 |
2 files changed, 34 insertions, 0 deletions
diff --git a/sql/updates/auth/2013_09_02_12_auth_misc.sql b/sql/updates/auth/2013_09_02_12_auth_misc.sql new file mode 100644 index 00000000000..640f54b03f8 --- /dev/null +++ b/sql/updates/auth/2013_09_02_12_auth_misc.sql @@ -0,0 +1,23 @@ +/* cs_lfg.cpp */ + +SET @id = 430; + +-- Add new permissions +DELETE FROM `rbac_permissions` WHERE `id` BETWEEN @id AND @id+5; +INSERT INTO `rbac_permissions` (`id`, `name`) VALUES +(@id+0, 'lfg'), +(@id+1, 'lfg player'), +(@id+2, 'lfg group'), +(@id+3, 'lfg queue'), +(@id+4, 'lfg clean'), +(@id+5, 'lfg options'); + +-- 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 +(2, @id+0), +(2, @id+1), +(2, @id+2), +(2, @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 new file mode 100644 index 00000000000..55fff43aafb --- /dev/null +++ b/sql/updates/world/2013_09_02_13_world_command.sql @@ -0,0 +1,11 @@ +/* cs_learn.cpp */ + +SET @id = 430; + +-- Update command table with new RBAC permissions +UPDATE `command` SET `permission` = @id+0 WHERE `name` = 'lfg'; +UPDATE `command` SET `permission` = @id+1 WHERE `name` = 'lfg player'; +UPDATE `command` SET `permission` = @id+2 WHERE `name` = 'lfg group'; +UPDATE `command` SET `permission` = @id+3 WHERE `name` = 'lfg queue'; +UPDATE `command` SET `permission` = @id+4 WHERE `name` = 'lfg clean'; +UPDATE `command` SET `permission` = @id+5 WHERE `name` = 'lfg options'); |
