Skip to content

Commit

Permalink
Regression: Add impersonate permission to app role (#22006)
Browse files Browse the repository at this point in the history
  • Loading branch information
sampaiodiego authored May 12, 2021
1 parent 309b6c6 commit c2e99d3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/authorization/server/startup.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Meteor.startup(function() {
{ _id: 'send-omnichannel-chat-transcript', roles: ['livechat-manager', 'admin'] },
{ _id: 'mail-messages', roles: ['admin'] },
{ _id: 'toggle-room-e2e-encryption', roles: ['owner'] },
{ _id: 'message-impersonate', roles: ['bot'] },
{ _id: 'message-impersonate', roles: ['bot', 'app'] },
{ _id: 'create-team', roles: ['admin', 'user'] },
{ _id: 'delete-team', roles: ['admin', 'owner'] },
{ _id: 'edit-team', roles: ['admin', 'owner'] },
Expand Down
1 change: 1 addition & 0 deletions server/startup/migrations/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,4 +220,5 @@ import './v220';
import './v221';
import './v222';
import './v223';
import './v224';
import './xrun';
11 changes: 11 additions & 0 deletions server/startup/migrations/v224.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Migrations } from '../../../app/migrations/server';
import { Permissions } from '../../../app/models/server';

const roleName = 'app';

Migrations.add({
version: 224,
up() {
Permissions.update({ _id: 'message-impersonate' }, { $addToSet: { roles: roleName } });
},
});

0 comments on commit c2e99d3

Please sign in to comment.