Skip to content

Commit

Permalink
adds necessary migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
c0dzilla committed Apr 2, 2018
1 parent 53f403f commit a3618b4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions server/startup/migrations/v110.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Migration to give delete channel, delete group permissions to owner
RocketChat.Migrations.add({
version: 110,
up() {
if (RocketChat.models && RocketChat.models.Permissions) {
RocketChat.models.Permissions.update({ _id: 'delete-c' }, { $addToSet: { roles: 'owner' } });
RocketChat.models.Permissions.update({ _id: 'delete-p' }, { $addToSet: { roles: 'owner' } });
}
}
});

0 comments on commit a3618b4

Please sign in to comment.