Perhaps this is an easy publishing question? I have users who are each part of a firm. Each firm has a sub-document “authUsers”, which lists all the users in the firm and their authorization levels. I’m trying to publish the firm by searching the authUsers for the current user ID.
Meteor.publish(“firm”, function () {
var user = Meteor.users.findOne(this.userId);
if (this.userId)
return Firms.findOne({“authUsers.userId” : user._id});
});
This is giving me a cursors error, and doesn’t seem to be returning anything. I do have a user logged in, so that doesn’t seem to be the issue. Sorry if this is a basic question, just starting with Meteor.