settings.js 978 B

12345678910111213141516171819202122232425262728293031323334353637
  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. customTopLeftCornerLogoImageUrl: 1,
  19. customTopLeftCornerLogoLinkUrl: 1,
  20. customTopLeftCornerLogoHeight: 1,
  21. customHTMLafterBodyStart: 1,
  22. customHTMLbeforeBodyEnd: 1,
  23. displayAuthenticationMethod: 1,
  24. defaultAuthenticationMethod: 1,
  25. },
  26. },
  27. );
  28. });
  29. Meteor.publish('mailServer', function() {
  30. if (!Match.test(this.userId, String)) return [];
  31. const user = Users.findOne(this.userId);
  32. if (user && user.isAdmin) {
  33. return Settings.find({}, { fields: { mailServer: 1 } });
  34. }
  35. return [];
  36. });