From f67330e2ad348e39068a22fa072825d682b825c9 Mon Sep 17 00:00:00 2001 From: Spp Date: Mon, 25 Feb 2013 14:37:13 +0100 Subject: Core/RBAC: Create new permissions 'Allow channel chat between factions', 'Join channels without announce' (both need config option enabled and permission set) and 'Change channel settings without being channel moderator' --- sql/updates/auth/2013_02_25_12_auth_misc.sql | 34 ++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 sql/updates/auth/2013_02_25_12_auth_misc.sql (limited to 'sql') diff --git a/sql/updates/auth/2013_02_25_12_auth_misc.sql b/sql/updates/auth/2013_02_25_12_auth_misc.sql new file mode 100644 index 00000000000..9d2f01a917d --- /dev/null +++ b/sql/updates/auth/2013_02_25_12_auth_misc.sql @@ -0,0 +1,34 @@ +-- Add new permissions +DELETE FROM `rbac_permissions` WHERE `id` IN (26, 46, 46); +INSERT INTO `rbac_permissions` (`id`, `name`) VALUES +(26, 'Allow channel chat between factions'), +(46, 'Join channels without announce'), +(46, 'Change channel settings without being channel moderator'); + +-- Add new role +DELETE FROM `rbac_roles` WHERE `id` IN (30, 31, 32); +INSERT INTO `rbac_roles` (`id`, `name`) VALUES +(30, 'Allow channel chat between factions'), +(31, 'Join channels without announce'), +(32, 'Change channel settings without being channel moderator'); + +-- Add the permission to the role +DELETE FROM `rbac_role_permissions` WHERE `roleId` IN (30, 31, 32); +INSERT INTO `rbac_role_permissions` (`roleId`, `permissionId`) VALUES +(30, 26), +(31, 46), +(32, 4645); + +-- Add it to all GM+ groups +DELETE FROM `rbac_role_permissions` WHERE `roleId` IN (30, 31, 32); +INSERT INTO `rbac_group_roles` (`groupId`, `roleId`) VALUES +(1, 30), +(2, 30), +(3, 30), +(4, 30), +(2, 31), +(3, 31), +(4, 31), +(2, 32), +(3, 32), +(4, 32); -- cgit v1.2.3