mirror of
https://github.com/wekan/wekan.git
synced 2025-04-24 22:17:16 -04:00
29 lines
602 B
JavaScript
29 lines
602 B
JavaScript
Meteor.publish('user-miniprofile', function(userId) {
|
|
check(userId, String);
|
|
|
|
return Users.find(userId, {
|
|
fields: {
|
|
'username': 1,
|
|
'profile.fullname': 1,
|
|
'profile.avatarUrl': 1,
|
|
},
|
|
});
|
|
});
|
|
|
|
Meteor.publish('user-admin', function() {
|
|
return Meteor.users.find(this.userId, {
|
|
fields: {
|
|
isAdmin: 1,
|
|
},
|
|
});
|
|
});
|
|
|
|
Meteor.publish('user-authenticationMethod', function(match) {
|
|
check(match, String);
|
|
return Users.find({$or: [{_id: match}, {email: match}, {username: match}]}, {
|
|
fields: {
|
|
'_id': 1,
|
|
'authenticationMethod': 1,
|
|
},
|
|
});
|
|
});
|