2023-01-15 01:11:16 +01:00
|
|
|
import { ReactiveCache } from '/imports/reactiveCache';
|
|
|
|
|
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,
|
2022-02-26 01:29:40 +02:00
|
|
|
disableForgotPassword: 1,
|
2019-06-28 12:52:09 -05:00
|
|
|
productName: 1,
|
|
|
|
hideLogo: 1,
|
2022-09-16 11:02:25 -03:00
|
|
|
hideCardCounterList: 1,
|
|
|
|
hideBoardMemberList: 1,
|
2020-09-18 18:45:48 +03:00
|
|
|
customLoginLogoImageUrl: 1,
|
2020-09-18 19:20:16 +03:00
|
|
|
customLoginLogoLinkUrl: 1,
|
2022-09-12 21:36:31 -03:00
|
|
|
customHelpLinkUrl: 1,
|
2020-10-03 00:21:19 +03:00
|
|
|
textBelowCustomLoginLogo: 1,
|
2021-03-04 16:42:35 +01:00
|
|
|
automaticLinkedUrlSchemes: 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,
|
2021-06-08 19:47:14 +02:00
|
|
|
spinnerName: 1,
|
2021-09-15 18:35:09 +02:00
|
|
|
oidcBtnText: 1,
|
2021-10-31 19:23:51 +02:00
|
|
|
mailDomainName: 1,
|
2021-11-25 19:30:49 +01:00
|
|
|
legalNotice: 1,
|
2019-06-28 12:52:09 -05:00
|
|
|
},
|
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() {
|
2023-01-15 01:11:16 +01:00
|
|
|
const user = ReactiveCache.getCurrentUser();
|
|
|
|
if (!user) {
|
|
|
|
return [];
|
|
|
|
}
|
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 [];
|
|
|
|
});
|