Meteor-Community-Packages / meteor-roles

Authorization package for Meteor, compatible with built-in accounts packages
http://meteor-community-packages.github.io/meteor-roles/
MIT License
921 stars 167 forks source link

what is the proper way to remove a role from a user? #240

Closed steveinatorx closed 4 years ago

steveinatorx commented 7 years ago

please include a code sample from latest build thanks

MuyBien commented 7 years ago

Roles.removeUsersFromRoles( Meteor.userId(), '<role-names(s)>', '<role-group>' );

When we need to remove a user from a role, we can use this. What's unique about this function is that we can pass either a single userId, or, an array. This is handy for doing bulk updates (e.g. removing a deprecated role) on several users.

source : https://themeteorchef.com/tutorials/using-the-roles-package