mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01:40 -05:00
17 lines
No EOL
450 B
JavaScript
17 lines
No EOL
450 B
JavaScript
Meteor.publish('settings', function() {
|
|
var options = {};
|
|
var privateFields = {};
|
|
|
|
// look at SettingsSchema to see which fields should be kept private
|
|
_.each(SettingsSchema._schema, function( val, key ) {
|
|
if (val.autoform && !!val.autoform.private)
|
|
privateFields[key] = false;
|
|
});
|
|
|
|
if(!isAdminById(this.userId)){
|
|
options = _.extend(options, {
|
|
fields: privateFields
|
|
});
|
|
}
|
|
return Settings.find({}, options);
|
|
}); |