wekan/server/publications/settings.js

70 lines
1.6 KiB
JavaScript
Raw Normal View History

import { ReactiveCache } from '/imports/reactiveCache';
Meteor.publish('globalwebhooks', () => {
const boardId = Integrations.Const.GLOBAL_WEBHOOK_ID;
const ret = ReactiveCache.getIntegrations(
{
boardId,
},
{},
true,
);
return ret;
});
Meteor.publish('setting', () => {
const ret = Settings.find(
2019-06-28 12:52:09 -05:00
{},
{
fields: {
disableRegistration: 1,
disableForgotPassword: 1,
2019-06-28 12:52:09 -05:00
productName: 1,
hideLogo: 1,
hideCardCounterList: 1,
hideBoardMemberList: 1,
customLoginLogoImageUrl: 1,
customLoginLogoLinkUrl: 1,
2022-09-12 21:36:31 -03:00
customHelpLinkUrl: 1,
textBelowCustomLoginLogo: 1,
2021-03-04 16:42:35 +01:00
automaticLinkedUrlSchemes: 1,
customTopLeftCornerLogoImageUrl: 1,
customTopLeftCornerLogoLinkUrl: 1,
customTopLeftCornerLogoHeight: 1,
2019-06-28 12:52:09 -05:00
customHTMLafterBodyStart: 1,
customHTMLbeforeBodyEnd: 1,
displayAuthenticationMethod: 1,
defaultAuthenticationMethod: 1,
spinnerName: 1,
oidcBtnText: 1,
mailDomainName: 1,
legalNotice: 1,
accessibilityPageEnabled: 1,
accessibilityTitle: 1,
accessibilityContent: 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
);
return ret;
});
2019-06-28 12:52:09 -05:00
Meteor.publish('mailServer', function() {
const user = ReactiveCache.getCurrentUser();
let ret = []
2019-06-28 12:52:09 -05:00
if (user && user.isAdmin) {
ret = Settings.find(
{},
{
fields: {
'mailServer.host': 1,
'mailServer.port': 1,
'mailServer.username': 1,
'mailServer.enableTLS': 1,
'mailServer.from': 1,
},
},
);
}
return ret;
});