2017-02-24 22:10:38 +08:00
|
|
|
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
|
|
|
});
|
2017-02-24 22:10:38 +08: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 [];
|
|
|
|
|
});
|