All Downloads are FREE. Search and download functionalities are using the official Maven repository.

scripts.3.4.0.2-update-default-role-REVIEWER.js Maven / Gradle / Ivy

There is a newer version: 4.5.2
Show newest version
print('Add new permissions to the default REVIEWER role');
db.roles.find({ scope:'API', name:'REVIEWER'}).forEach(role => {
    let newPermissions = role.permissions.filter( p => p < 3000 || p > 3015);
    newPermissions.push(3014);
    role.permissions = newPermissions;
    db.roles.replaceOne({ _id: role._id }, role);
});




© 2015 - 2024 Weber Informatics LLC | Privacy Policy