mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 09:59:47 -05:00
Admin Panel / Settings / Features gets one switch, stored as webhooksDisabled on the Settings document and saved by the site-admin method saveWebhooksDisabled (audited). While it is on: - nothing is sent: board and global webhooks, two-way webhooks, Mattermost direct messages, the grouped and scheduled queue, durable Sync webhooks, the login and registration webhook and bot dispatches all ask webhooksOff() first (models/lib/webhooksSwitch.js SENDERS); - adding or changing a webhook is refused: the Integrations deny rules, the REST POST/PUT and activities routes (403 webhooks-disabled), a webhook's own delivery settings and saveAccountWebhook. Each refusal is recorded in Admin Panel / Problems as "Webhooks turned off" (authz.webhooks-disabled, blocksAccount: false); a silent non-send is never recorded; - nothing is deleted, so turning it off brings every webhook back. Removing a webhook stays allowed. Also the site-admin method webhooksReportPage for the coming Admin Panel / Problems report: every integration with its board and owner, the token reduced to whether one is set, secrets masked in the URL. Tests: tests/webhooksSwitch.test.cjs (the queue sends nothing and keeps what waits; every webhookFetch caller is a sender that asks or is listed as not a webhook; every write path refuses and records; report rows carry no token), a server mocha test, and the existing vm-driven suites supplied with the switch, with a negative case that nothing is sent. Thanks to xet7 !