From 7d7007dca75ab3a3a48b9f3fd7cc4350cc626870 Mon Sep 17 00:00:00 2001 From: Paweł Bogusławski Date: Thu, 11 Feb 2021 18:34:34 +0100 Subject: Added option to disable webhooks (#13176) * Added option to disable web hooks This mod introduces DISABLE_WEB_HOOKS parameter in [security] section of app.ini (by default set to false). If set to true it disables web hooks feature. Any existing undelivered web hook tasks will be cancelled. Any existing web hook definitions will be left untouched in db but its delivery tasks will be ignored. Author-Change-Id: IB#1105130 * Webhook spelling fixed Webhook spelling fixed. Fixes: 07df6614dc84cdd2e9f39c57577fa1062bd70012 Related: https://github.com/go-gitea/gitea/pull/13176#pullrequestreview-510868421 Author-Change-Id: IB#1105174 * Parameter description fixed Parameter description fixed. Fixes: 07df6614dc84cdd2e9f39c57577fa1062bd70012 Related: https://github.com/go-gitea/gitea/pull/13176#pullrequestreview-514086107 Author-Change-Id: IB#1105174 --- modules/templates/helper.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'modules/templates') diff --git a/modules/templates/helper.go b/modules/templates/helper.go index b8e4f5d505..00ccd49cb4 100644 --- a/modules/templates/helper.go +++ b/modules/templates/helper.go @@ -229,6 +229,9 @@ func NewFuncMap() []template.FuncMap { "DisableGitHooks": func() bool { return setting.DisableGitHooks }, + "DisableWebhooks": func() bool { + return setting.DisableWebhooks + }, "DisableImportLocal": func() bool { return !setting.ImportLocalPaths }, -- cgit v1.2.3