Closed neopostmodern closed 5 years ago
Im having the same issue, did you find out why?
No, I've sticked with above.
I'm having a similar problem. Or let's say it's the reason why Meteor.user().roles
does not work.
Meteor.user()
or Meteor.userId()
needs to be run in a fiber. What I just came up with is wrapping that in a method. Don't know if that's the best approach, but it works for now.
Meteor.methods({
'user' () {
return Meteor.user()
}
})
And then instead of just calling Meteor.user()
you call Meteor.call('user')
.
any updates on this?
Please provide a reproduction for this. Also test please with latest version. I can reopen the issue then.
METEOR@1.4.1.1 / alanning:roles@1.2.15
I'm having issues with SSR. I checked all this, but the example repo doesn't feature SSR and the talk also didn't seem to touch my issues.
A small code snippet to point out my issue would be:
Which on the server logs
On the client 1 and 2 are equal (and correct, i.e. include
roles
and can rell if they are in a group).So, long story short -
Meteor.user()
doesn't seem to include theroles
field when doing SSR. No idea if this is related to this package or something very different, but it makes things kind of arbitrary and very un-isomorphic.