Fix GHSL-2026-037_Wekan.

Thanks to GHSL and xet7.
This commit is contained in:
Lauri Ojansivu 2026-02-19 23:36:44 +02:00
parent 8c00adc6b8
commit 1ee9b2e917

View file

@ -1,12 +1,25 @@
import { ReactiveCache } from '/imports/reactiveCache';
Meteor.publish('globalwebhooks', async () => {
Meteor.publish('globalwebhooks', async function() {
if (!this.userId) {
return this.ready();
}
const user = await ReactiveCache.getCurrentUser();
if (!user || !user.isAdmin) {
return this.ready();
}
const boardId = Integrations.Const.GLOBAL_WEBHOOK_ID;
const ret = await ReactiveCache.getIntegrations(
{
boardId,
},
{},
{
fields: {
token: 0,
},
},
true,
);
return ret;