mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 18:11:40 -05:00
fix #952
This commit is contained in:
parent
138d0ff18d
commit
0ea60e8f52
2 changed files with 4 additions and 7 deletions
|
@ -27,7 +27,7 @@ Users.pubsub.publicProperties = { // true means exposed
|
|||
'telescope.karma': true,
|
||||
'telescope.postCount': true,
|
||||
'telescope.slug': true,
|
||||
'telescope.username': true,
|
||||
'telescope.displayName': true,
|
||||
'telescope.notifications': true,
|
||||
'telescope.bio': true,
|
||||
'telescope.github': true,
|
||||
|
@ -48,13 +48,14 @@ Users.pubsub.hiddenProperties = {
|
|||
};
|
||||
|
||||
/**
|
||||
* Minimum required properties to display avatars
|
||||
* Minimum required properties to display avatars and display names
|
||||
* @type {Object}
|
||||
*/
|
||||
Users.pubsub.avatarProperties = {
|
||||
_id: true,
|
||||
'telescope.emailHash': true,
|
||||
'telescope.slug': true,
|
||||
'telescope.displayName': true,
|
||||
username: true,
|
||||
'profile.username': true,
|
||||
'profile.github': true,
|
||||
|
|
|
@ -41,11 +41,7 @@ Meteor.publish('currentUser', function() {
|
|||
Meteor.publish('allUsersAdmin', function() {
|
||||
var selector = Settings.get('requirePostInvite') ? {isInvited: true} : {}; // only users that can post
|
||||
if (Users.is.adminById(this.userId)) {
|
||||
return Meteor.users.find(selector, {fields: {
|
||||
_id: true,
|
||||
profile: true,
|
||||
slug: true
|
||||
}});
|
||||
return Meteor.users.find(selector, {fields: Users.pubsub.avatarProperties});
|
||||
}
|
||||
return [];
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue