aboutsummaryrefslogtreecommitdiff
path: root/sql/updates/auth
diff options
context:
space:
mode:
authorSpp <spp@jorge.gr>2013-02-25 13:32:31 +0100
committerSpp <spp@jorge.gr>2013-02-25 15:48:18 +0100
commitd14cb26e6e608902e10f6935ec3de86962e32738 (patch)
treeda879ccd534944196043c95bc382de5bd8f83ee6 /sql/updates/auth
parentea2e6052b2edc730d27e13e62b83f276d2dc1687 (diff)
Core/RBAC: Create new permission 'Two side mail interaction'. In order to send/receive mails from other faction, config option should be enabled and both sender and receiver should have the permission
Diffstat (limited to 'sql/updates/auth')
-rw-r--r--sql/updates/auth/2013_02_25_08_auth_misc.sql19
1 files changed, 19 insertions, 0 deletions
diff --git a/sql/updates/auth/2013_02_25_08_auth_misc.sql b/sql/updates/auth/2013_02_25_08_auth_misc.sql
new file mode 100644
index 00000000000..35b12b1eddb
--- /dev/null
+++ b/sql/updates/auth/2013_02_25_08_auth_misc.sql
@@ -0,0 +1,19 @@
+-- Add new permission
+DELETE FROM `rbac_permissions` WHERE `id` = 27;
+INSERT INTO `rbac_permissions` (`id`, `name`) VALUES (27, 'Send mail to other faction');
+
+-- Add new role
+DELETE FROM `rbac_roles` WHERE `id` = 19;
+INSERT INTO `rbac_roles` (`id`, `name`) VALUES (19, 'Send mail to other faction');
+
+-- Add the permission to the role
+DELETE FROM `rbac_role_permissions` WHERE `roleId` = 19;
+INSERT INTO `rbac_role_permissions` (`roleId`, `permissionId`) VALUES (19, 27);
+
+-- Add it to all GM+ groups
+DELETE FROM `rbac_group_roles` WHERE `roleId` = 19;
+INSERT INTO `rbac_group_roles` (`groupId`, `roleId`) VALUES
+(1, 19),
+(2, 19),
+(3, 19),
+(4, 19);