settings.js 557 B

1234567891011121314151617181920212223
  1. Meteor.publish('setting', () => {
  2. return Settings.find({}, {
  3. fields:{
  4. disableRegistration: 1,
  5. productName: 1,
  6. hideLogo: 1,
  7. customHTMLafterBodyStart: 1,
  8. customHTMLbeforeBodyEnd: 1,
  9. displayAuthenticationMethod: 1,
  10. defaultAuthenticationMethod: 1,
  11. },
  12. });
  13. });
  14. Meteor.publish('mailServer', function () {
  15. if (!Match.test(this.userId, String))
  16. return [];
  17. const user = Users.findOne(this.userId);
  18. if(user && user.isAdmin){
  19. return Settings.find({}, {fields: {mailServer: 1}});
  20. }
  21. return [];
  22. });