mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 18:11:40 -05:00
publish all users to make autocomplete work, but only for admins
This commit is contained in:
parent
e18c5bbc0f
commit
8c7ba04589
2 changed files with 10 additions and 2 deletions
|
@ -28,8 +28,8 @@ Meteor.subscribe('categories');
|
||||||
// Meteor doesn't send all the user properties that we need
|
// Meteor doesn't send all the user properties that we need
|
||||||
Meteor.subscribe('currentUser');
|
Meteor.subscribe('currentUser');
|
||||||
|
|
||||||
// Subscribe to all users for now to make user selection autocomplete work?
|
// Subscribe to all users for now to make user selection autocomplete work
|
||||||
// Meteor.subscribe('allUsers', {}, {});
|
Meteor.subscribe('allUsersAdmin');
|
||||||
|
|
||||||
// Notifications - only load if user is logged in
|
// Notifications - only load if user is logged in
|
||||||
if(Meteor.user() != null)
|
if(Meteor.user() != null)
|
||||||
|
|
|
@ -77,6 +77,14 @@ Meteor.publish('allUsers', function(find, options) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// publish all users for admins to make autocomplete work
|
||||||
|
// TODO: find a better way
|
||||||
|
|
||||||
|
Meteor.publish('allUsersAdmin', function() {
|
||||||
|
if (isAdminById(this.userId))
|
||||||
|
return Meteor.users.find();
|
||||||
|
});
|
||||||
|
|
||||||
// -------------------------------------------- Posts -------------------------------------------- //
|
// -------------------------------------------- Posts -------------------------------------------- //
|
||||||
|
|
||||||
// Publish a single post
|
// Publish a single post
|
||||||
|
|
Loading…
Add table
Reference in a new issue