You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We, the Members of Meteor Community Packages take every issue seriously.
Our goal is to provide long-term lifecycles for packages and keep up
with the newest changes in Meteor and the overall NodeJs/JavaScript ecosystem.
However, we contribute to these packages mostly in our free time.
Therefore, we can't guarantee your issues to be solved within certain time.
If you think this issue is trivial to solve, don't hesitate to submit
a pull request, too! We will accompany you in the process with reviews and hints
on how to get development set up.
Please also consider sponsoring the maintainers of the package.
If you don't know who is currently maintaining this package, just leave a comment
and we'll let you know
Hi @Berchez can you confirm the Meteor.roleAssignment.find({ 'user._id': this.userId }).fetch() returns the correct expected data (so we can exclude the migration as a root cause).
Describe the bug
TL;DR - My
Roles.getRolesForUser()
always returns an empty array (even on the server-side).Hi, I read the documentation and published it:
Meteor.publish(null, function() { if (this.userId) { return Meteor.roleAssignment.find({ 'user._id': this.userId }); } else { this.ready(); } });
However, even with the publication, my Roles.getRolesForUser() calls don't return anything. Regardless of whether it's on the client or the server.
I also read the issue #296 where the guy forgot to import the publication (which is not my case).
Other methods from v3 work normally in my code. (I haven't been able to test them all yet).
Meteor.roleAssignment.find({ 'user._id': this.userId }).fetch()
, normally returns my user's roles.To Reproduce
After migrating from v1 to v2 and finally v3, I just call
Roles.getRolesForUser(userId)
inside auseEffect
or inside a meteor method and it returns[]
Expected behavior
Return a result similar to Meteor.roleAssignment.find({ 'user._id': this.userId }).fetch() when I call Roles.getRolesForUser(this.userId)
Versions (please complete the following information):
The text was updated successfully, but these errors were encountered: