mirror of
https://github.com/wekan/wekan.git
synced 2026-02-21 07:24:07 +01:00
Fix GHSL-2026-037_Wekan.
Thanks to GHSL and xet7.
This commit is contained in:
parent
8c00adc6b8
commit
1ee9b2e917
1 changed files with 15 additions and 2 deletions
|
|
@ -1,12 +1,25 @@
|
||||||
import { ReactiveCache } from '/imports/reactiveCache';
|
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 boardId = Integrations.Const.GLOBAL_WEBHOOK_ID;
|
||||||
const ret = await ReactiveCache.getIntegrations(
|
const ret = await ReactiveCache.getIntegrations(
|
||||||
{
|
{
|
||||||
boardId,
|
boardId,
|
||||||
},
|
},
|
||||||
{},
|
{
|
||||||
|
fields: {
|
||||||
|
token: 0,
|
||||||
|
},
|
||||||
|
},
|
||||||
true,
|
true,
|
||||||
);
|
);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue