Closed Netherdrake closed 7 years ago
This doesnt work because Meteor.user might not be available or the Roles collection is not available because the subscription did not finish yet.
Maybe this article can help.
There is a solution on the bottom of this post that seems to work.
I would like to do this:
However
Roles.userIsInRole(Meteor.userId(), 'admin')
always returnsfalse
when called from FlowRouter.triggers. It does returntrue
when called from browser console.Any ideas for how could I achieve this?