settings.js 936 B

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