The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Rocket.Chat/server/startup/migrations/v174.js

26 lines
623 B

import { Migrations } from '../../../app/migrations/server';
import { Permissions } from '../../../app/models/server';
const appRolePermissions = [
'api-bypass-rate-limit',
'create-c',
'create-d',
'create-p',
'join-without-join-code',
'leave-c',
'leave-p',
'send-many-messages',
'view-c-room',
'view-d-room',
'view-joined-room',
];
Migrations.add({
version: 174,
up() {
Permissions.update({ _id: { $in: appRolePermissions } }, { $addToSet: { roles: 'app' } }, { multi: true });
},
down() {
Permissions.update({ _id: { $in: appRolePermissions } }, { $pull: { roles: 'app' } }, { multi: true });
},
});