Regression: not allowed to edit roles due to a new verification (#22159)

pull/22167/head
Douglas Fabris 4 years ago committed by GitHub
parent 5a6475eb4a
commit 3778814a8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      app/authorization/server/methods/saveRole.js

@ -13,15 +13,6 @@ Meteor.methods({
action: 'Accessing_permissions',
});
}
const options = {
projection: { _id: 1 },
};
const roleExists = Roles.findOne(roleData.name, options);
if (roleExists) {
throw new Meteor.Error('error-role-already-present', 'A role with this name already exists', {
method: 'authorization:saveRole',
});
}
if (!roleData.name) {
throw new Meteor.Error('error-role-name-required', 'Role name is required', {

Loading…
Cancel
Save