The code below works for me (coffeescript). The pwd field is not published.
Server
Meteor.publish "users", (userId) -> user = Users.find userId, fields: pwd: false return user
Client
Meteor.autosubscribe -> userId = Session.get SESSION_USER Meteor.subscribe 'users', userId
The only differences that I see are
0 vs false ... (should only taste)- Access your collection through
Meteor - In the client, my subscription is placed inside the
autosubscribe when you use the observe method.
Are there any fields resulting from the result of Meteor.users.find().fetch() in the browser console?
Andreas
source share