wekan/server/publications/users.js
Lauri Ojansivu 288800eafc - Add LDAP. In progress.
Thanks to maximest-pierre, Akuket and xet.

Related #119
2018-10-03 11:50:52 +03:00

29 lines
552 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-connection-method', function(match) {
check(match, String);
return Users.find({$or: [{email: match}, {username: match}]}, {
fields: {
ldap: 1,
},
});
});