mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 12:36:39 -04:00
26 lines
725 B
JavaScript
26 lines
725 B
JavaScript
// Meteor.publish('settings', function() {
|
|
// var options = {};
|
|
// var privateFields = {};
|
|
|
|
// // look at Settings.simpleSchema._schema to see which fields should be kept private
|
|
// _.each(Telescope.settings.collection.simpleSchema()._schema, (property, key) => {
|
|
// if (property.private)
|
|
// privateFields[key] = false;
|
|
// });
|
|
|
|
// options = _.extend(options, {
|
|
// fields: privateFields
|
|
// });
|
|
|
|
// return Telescope.settings.collection.find({}, options);
|
|
// });
|
|
|
|
Telescope.settings.collection.smartPublish('settings');
|
|
|
|
Meteor.publish('settings.admin', function() {
|
|
if (Users.is.adminById(this.userId)) {
|
|
return Telescope.settings.collection.find({}, {});
|
|
} else {
|
|
return [];
|
|
}
|
|
});
|