aboutsummaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorSpp <spp@jorge.gr>2013-02-25 14:01:51 +0100
committerSpp <spp@jorge.gr>2013-02-25 15:48:18 +0100
commit9bd697066b4f2f3e46d44f57457cfba8961f6316 (patch)
tree7984b4c10c32edbaf96fcdb17a041c3e789f3713 /sql
parentfc78c48495661dc1e8393c637028971c8126a680 (diff)
Core/RBAC: Add new permissions 'Skip disable map check', 'Skip reset talents when used more than allowed check', 'Skip spam chat check', 'Restore saved gm setting states', 'Use Config option START_GM_LEVEL to assign new character level'
Diffstat (limited to 'sql')
-rw-r--r--sql/updates/auth/2013_02_25_10_auth_misc.sql43
1 files changed, 43 insertions, 0 deletions
diff --git a/sql/updates/auth/2013_02_25_10_auth_misc.sql b/sql/updates/auth/2013_02_25_10_auth_misc.sql
new file mode 100644
index 00000000000..4255bdac8ba
--- /dev/null
+++ b/sql/updates/auth/2013_02_25_10_auth_misc.sql
@@ -0,0 +1,43 @@
+-- Add new permissions
+DELETE FROM `rbac_permissions` WHERE `id` IN (20, 21, 22, 39, 41);
+INSERT INTO `rbac_permissions` (`id`, `name`) VALUES
+(20, 'Skip disable map check'),
+(21, 'Skip reset talents when used more than allowed check'),
+(22, 'Skip spam chat check'),
+(39, 'Restore saved gm setting states'),
+(41, 'Use Config option START_GM_LEVEL to assign new character level');
+
+-- Add new role
+DELETE FROM `rbac_roles` WHERE `id` IN (22, 23, 24, 25, 26);
+INSERT INTO `rbac_roles` (`id`, `name`) VALUES
+(22, 'Skip disable map check'),
+(23, 'Skip reset talents when used more than allowed check'),
+(24, 'Skip spam chat check'),
+(25, 'Restore saved gm setting states'),
+(26, 'Use Config option START_GM_LEVEL to assign new character level');
+
+-- Add the permission to the role
+DELETE FROM `rbac_role_permissions` WHERE `roleId` IN (22, 23, 24, 25, 26);
+INSERT INTO `rbac_role_permissions` (`roleId`, `permissionId`) VALUES
+(22, 20),
+(23, 21),
+(24, 22),
+(25, 39),
+(26, 41);
+
+-- Add it to all GM+ groups
+DELETE FROM `rbac_role_permissions` WHERE `roleId` IN (22, 23, 24, 25, 26);
+INSERT INTO `rbac_group_roles` (`groupId`, `roleId`) VALUES
+(2, 22),
+(3, 22),
+(4, 22),
+(4, 23),
+(2, 24),
+(3, 24),
+(4, 24),
+(2, 25),
+(3, 25),
+(4, 25),
+(2, 26),
+(3, 26),
+(4, 26);