aboutsummaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2013-09-01 00:59:58 +0200
committerShauren <shauren.trinity@gmail.com>2013-09-01 00:59:58 +0200
commitd6fdd05493aaa8600b07eb17dfee222a8379b033 (patch)
tree434b440bc5e5ddfd4ec7d7b48ab54839d2d2f5b9 /sql
parent6c8d0e5405a4def3be80c6c4be0abc156a34b031 (diff)
parent1bbd726e88260bb2904698317cd8d665d670ac0b (diff)
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Diffstat (limited to 'sql')
-rw-r--r--sql/updates/auth/2013_08_30_04_auth_misc.sql24
-rw-r--r--sql/updates/world/2013_08_31_08_world_command.sql12
2 files changed, 36 insertions, 0 deletions
diff --git a/sql/updates/auth/2013_08_30_04_auth_misc.sql b/sql/updates/auth/2013_08_30_04_auth_misc.sql
new file mode 100644
index 00000000000..422f0f38c50
--- /dev/null
+++ b/sql/updates/auth/2013_08_30_04_auth_misc.sql
@@ -0,0 +1,24 @@
+/* cs_bf.cpp */
+
+SET @id = 257;
+
+-- Add new permissions
+DELETE FROM `rbac_permissions` WHERE `id` BETWEEN @id AND @id+5;
+INSERT INTO `rbac_permissions` (`id`, `name`) VALUES
+(@id+0, 'bf'),
+(@id+1, 'bf start'),
+(@id+2, 'bf stop'),
+(@id+3, 'bf switch'),
+(@id+4, 'bf timer'),
+(@id+5, 'bf enabled');
+
+-- 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
+(4, @id+0),
+(4, @id+1),
+(4, @id+2),
+(4, @id+3),
+(4, @id+4),
+(4, @id+5);
+
diff --git a/sql/updates/world/2013_08_31_08_world_command.sql b/sql/updates/world/2013_08_31_08_world_command.sql
new file mode 100644
index 00000000000..c48180f36b5
--- /dev/null
+++ b/sql/updates/world/2013_08_31_08_world_command.sql
@@ -0,0 +1,12 @@
+/* cs_bf.cpp */
+
+SET @id = 257;
+
+-- Update command table with new RBAC permissions
+UPDATE `command` SET `permission` = @id+0 WHERE `name` = 'bf';
+UPDATE `command` SET `permission` = @id+1 WHERE `name` = 'bf start';
+UPDATE `command` SET `permission` = @id+2 WHERE `name` = 'bf stop';
+UPDATE `command` SET `permission` = @id+3 WHERE `name` = 'bf switch';
+UPDATE `command` SET `permission` = @id+4 WHERE `name` = 'bf timer';
+UPDATE `command` SET `permission` = @id+5 WHERE `name` = 'bf enabled';
+