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

Users roles not published #241

Closed MuyBien closed 7 years ago

MuyBien commented 7 years ago

Hi! I'm trying to use the role package (the V2) but I cannot get a user role in client side. In the database I have the good role sets for the user but in the client side the users object doesn't have the roles part...

What am I doing wrong?

I did the publication

Meteor.publish("roles.all", function () {
    return Meteor.roles.find({})
});

and I added the "roles" to the publicFields to the user publication.

But in the client console, if I show the users objects I don't see the roles... :(

MuyBien commented 7 years ago

Oups I jut forgot to put the scope for the user role.. Sorry