Hi guys,
hmmm… I am probably doing missing something really stupid here…
I’d to publish a collection only to logged in users.
The problem is that it DOES NOT load data AFTER a login, until I do a hot-page refresh.
So basically Meteor.publish does NOT rerun after a normal LOGIN.
This is the code.
Meteor.publish('items', function() {
// restrict to logged in!
console.log('run publication');
// reactive rerun
if (this.userId) {
console.log('publish!');
return Items.find();
} else {
console.log('stop publication!');
this.stop();
return;
}
})
Any ideas what how to get this working?