2019-08-17 19:17:57 -04:00
|
|
|
Meteor.publish('globalwebhooks', () => {
|
|
|
|
const boardId = Integrations.Const.GLOBAL_WEBHOOK_ID;
|
|
|
|
return Integrations.find({
|
|
|
|
boardId,
|
|
|
|
});
|
|
|
|
});
|
2017-02-24 22:10:38 +08:00
|
|
|
Meteor.publish('setting', () => {
|
2019-06-28 12:52:09 -05:00
|
|
|
return Settings.find(
|
|
|
|
{},
|
|
|
|
{
|
|
|
|
fields: {
|
|
|
|
disableRegistration: 1,
|
|
|
|
productName: 1,
|
|
|
|
hideLogo: 1,
|
2020-09-18 18:45:48 +03:00
|
|
|
customLoginLogoImageUrl: 1,
|
2020-09-18 19:20:16 +03:00
|
|
|
customLoginLogoLinkUrl: 1,
|
2020-10-03 00:21:19 +03:00
|
|
|
textBelowCustomLoginLogo: 1,
|
2020-09-18 18:45:48 +03:00
|
|
|
customTopLeftCornerLogoImageUrl: 1,
|
2020-09-18 19:20:16 +03:00
|
|
|
customTopLeftCornerLogoLinkUrl: 1,
|
2020-11-02 17:53:01 +02:00
|
|
|
customTopLeftCornerLogoHeight: 1,
|
2019-06-28 12:52:09 -05:00
|
|
|
customHTMLafterBodyStart: 1,
|
|
|
|
customHTMLbeforeBodyEnd: 1,
|
|
|
|
displayAuthenticationMethod: 1,
|
|
|
|
defaultAuthenticationMethod: 1,
|
|
|
|
},
|
2019-02-01 21:26:04 +02:00
|
|
|
},
|
2019-06-28 12:52:09 -05:00
|
|
|
);
|
2017-02-24 22:10:38 +08:00
|
|
|
});
|
|
|
|
|
2019-06-28 12:52:09 -05:00
|
|
|
Meteor.publish('mailServer', function() {
|
|
|
|
if (!Match.test(this.userId, String)) return [];
|
2017-02-24 22:10:38 +08:00
|
|
|
const user = Users.findOne(this.userId);
|
2019-06-28 12:52:09 -05:00
|
|
|
if (user && user.isAdmin) {
|
2021-02-25 09:02:23 +02:00
|
|
|
return Settings.find(
|
|
|
|
{},
|
|
|
|
{
|
|
|
|
fields: {
|
|
|
|
'mailServer.host': 1,
|
|
|
|
'mailServer.port': 1,
|
|
|
|
'mailServer.username': 1,
|
|
|
|
'mailServer.enableTLS': 1,
|
|
|
|
'mailServer.from': 1,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
);
|
2017-02-24 22:10:38 +08:00
|
|
|
}
|
|
|
|
return [];
|
|
|
|
});
|