settings.js 741 B

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