mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 04:26:41 -04:00
26 lines
No EOL
614 B
JavaScript
26 lines
No EOL
614 B
JavaScript
Meteor.publish('settings', function() {
|
|
var options = {};
|
|
if(!isAdminById(this.userId)){
|
|
options = _.extend(options, {
|
|
fields: {
|
|
mailChimpAPIKey: false,
|
|
mailChimpListId: false
|
|
}
|
|
});
|
|
}
|
|
return Settings.find({}, options);
|
|
});
|
|
|
|
Meteor.publish('notifications', function() {
|
|
// only publish notifications belonging to the current user
|
|
if(canViewById(this.userId)){
|
|
return Notifications.find({userId:this.userId});
|
|
}
|
|
return [];
|
|
});
|
|
|
|
Meteor.publish('invites', function(){
|
|
if(canViewById(this.userId)){
|
|
return Invites.find({invitingUserId:this.userId});
|
|
}
|
|
}); |