mirror of
https://github.com/wekan/wekan.git
synced 2025-12-17 07:50:12 +01:00
Do not publish the whole user doc of board members (#579)
The user document contains hashed passwords and hashed resume tokens. We should only publish the required bits.
This commit is contained in:
parent
3a0a9fa009
commit
abc58e7482
1 changed files with 5 additions and 1 deletions
|
|
@ -105,7 +105,11 @@ Meteor.publishRelations('board', function(boardId) {
|
||||||
//
|
//
|
||||||
this.cursor(Users.find({
|
this.cursor(Users.find({
|
||||||
_id: { $in: _.pluck(board.members, 'userId') },
|
_id: { $in: _.pluck(board.members, 'userId') },
|
||||||
}), function(userId) {
|
}, { fields: {
|
||||||
|
'username': 1,
|
||||||
|
'profile.fullname': 1,
|
||||||
|
'profile.avatarUrl': 1,
|
||||||
|
}}), function(userId) {
|
||||||
// Presence indicators
|
// Presence indicators
|
||||||
this.cursor(presences.find({ userId }));
|
this.cursor(presences.find({ userId }));
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue