2
0

settings.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. customLoginLogoImageUrl: 1,
  16. customLoginLogoLinkUrl: 1,
  17. textBelowCustomLoginLogo: 1,
  18. automaticLinkedUrlSchemes: 1,
  19. customTopLeftCornerLogoImageUrl: 1,
  20. customTopLeftCornerLogoLinkUrl: 1,
  21. customTopLeftCornerLogoHeight: 1,
  22. customHTMLafterBodyStart: 1,
  23. customHTMLbeforeBodyEnd: 1,
  24. displayAuthenticationMethod: 1,
  25. defaultAuthenticationMethod: 1,
  26. spinnerName: 1,
  27. },
  28. },
  29. );
  30. });
  31. Meteor.publish('mailServer', function() {
  32. if (!Match.test(this.userId, String)) return [];
  33. const user = Users.findOne(this.userId);
  34. if (user && user.isAdmin) {
  35. return Settings.find(
  36. {},
  37. {
  38. fields: {
  39. 'mailServer.host': 1,
  40. 'mailServer.port': 1,
  41. 'mailServer.username': 1,
  42. 'mailServer.enableTLS': 1,
  43. 'mailServer.from': 1,
  44. },
  45. },
  46. );
  47. }
  48. return [];
  49. });