mirror of
https://github.com/wekan/wekan.git
synced 2026-11-25 04:49:41 -05:00
The tick sits below SQRL and ActivityPub and is saved at once. While it
is on, the {{webhooksOff}} helper (client/lib/webhooksSwitch.js) hides,
rather than greys out: the board menu's Outgoing Webhooks, the Global
Webhooks entry of the Settings menu (an old link to its pane says that
all webhooks are turned off), Board Settings / Bots and the Rules action
Dispatch to bot, the due-reminder webhook tick and the webhook row of the
notification delivery settings. Opening a card no longer asks the server
to send the card-opened webhook either.
The board menu guard test now expects the extra guard on Outgoing
Webhooks and Bots: one guard more, never one fewer.
Thanks to xet7 !
16 lines
651 B
JavaScript
16 lines
651 B
JavaScript
// Admin Panel / Settings / Features / Turn off all webhooks
|
|
// (models/lib/webhooksSwitch.js) for the interface: while it is on, every
|
|
// webhook screen is hidden - not greyed out. The server refuses and sends
|
|
// nothing whatever the interface shows (server/webhooksSwitch.js).
|
|
import { Template } from 'meteor/templating';
|
|
import { ReactiveCache } from '/imports/reactiveCache';
|
|
|
|
const { webhooksDisabled } = require('/models/lib/webhooksSwitch');
|
|
|
|
export function webhooksOff() {
|
|
return webhooksDisabled(ReactiveCache.getCurrentSetting());
|
|
}
|
|
|
|
// {{#unless webhooksOff}} in a template.
|
|
Template.registerHelper('webhooksOff', () => webhooksOff());
|