Skip to content
Snippets Groups Projects
Commit 99ff8335 authored by Flavio Grossi's avatar Flavio Grossi Committed by Rodrigo Nascimento
Browse files

fix invalid role error msg when removing user from room (#3878)

parent 20957470
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@ RocketChat.authz.removeUserFromRoles = (userId, roleNames, scope) ->
roleNames = [].concat roleNames
existingRoleNames = _.pluck(RocketChat.authz.getRoles(), 'name')
existingRoleNames = _.pluck(RocketChat.authz.getRoles(), '_id')
invalidRoleNames = _.difference(roleNames, existingRoleNames)
unless _.isEmpty(invalidRoleNames)
throw new Meteor.Error 'error-invalid-role', 'Invalid role', { function: 'RocketChat.authz.removeUserFromRoles' }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment