wekan/server/publications/settings.js

24 lines
557 B
JavaScript
Raw Normal View History

Meteor.publish('setting', () => {
2019-02-01 19:00:44 +01:00
return Settings.find({}, {
fields:{
disableRegistration: 1,
productName: 1,
hideLogo: 1,
customHTMLafterBodyStart: 1,
customHTMLbeforeBodyEnd: 1,
displayAuthenticationMethod: 1,
2019-02-01 21:26:04 +02:00
defaultAuthenticationMethod: 1,
},
2019-02-01 19:00:44 +01:00
});
});
Meteor.publish('mailServer', function () {
if (!Match.test(this.userId, String))
return [];
const user = Users.findOne(this.userId);
if(user && user.isAdmin){
return Settings.find({}, {fields: {mailServer: 1}});
}
return [];
});