Hi! I have my Devices collection that have a property called “createdBy” that holds the user ID that created the entry, and I want to display that user name in the frontend instead of the ugly userId string.
My publication is really simple and looks like this.
Meteor.publish('devices.view', function devicesViewPublication(_id) {
check(_id, String);
if (this.userId && isAdmin(this.userId)) {
return Devices.find({ _id });
}
return this.ready();
});