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 168 forks source link

Add method that replace old roles by new roles #197

Closed HatemJerbi closed 8 years ago

HatemJerbi commented 8 years ago

Take the example when we have a form where admin assign roles to specific user by group of check box. the method Roles.addUsersToRoles can't handle this situation because it add new assigned roles and didn't delete unassigned roles. thxs

mitar commented 8 years ago

You should use setUserRoles.

HatemJerbi commented 8 years ago

typo: i mean Roles.setUserRoles can't handle this situation

mitar commented 8 years ago

@HatemJerbi: Why you closed this ticket now? Was the issue resolved for you?

HatemJerbi commented 8 years ago

sorry mitar it was my fault, there is no problem with your setUserRoles method.

Best regards

mitar commented 8 years ago

I am glad it has been resolved.