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/v082.js

12 lines
348 B

import { Migrations } from '../../../app/migrations';
import { getUsersInRole, removeUserFromRoles } from '../../../app/authorization';
Migrations.add({
version: 82,
up() {
const admins = getUsersInRole('admin').fetch();
if (admins.length === 1 && admins[0]._id === 'rocket.cat') {
removeUserFromRoles('rocket.cat', 'admin');
}
},
});