diff options
author | techknowlogick <techknowlogick@users.noreply.github.com> | 2017-09-12 05:25:42 -0400 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2017-09-12 12:25:42 +0300 |
commit | 9bdbfbf6f3289f4df0df5aae9998a08483f22218 (patch) | |
tree | 5ae5d89fbb745876517fba4abb2a0c007a3654de /modules/setting | |
parent | 3fecf94086be1b5f2bddd48cebc0e1ca4702de5c (diff) | |
download | gitea-9bdbfbf6f3289f4df0df5aae9998a08483f22218.tar.gz gitea-9bdbfbf6f3289f4df0df5aae9998a08483f22218.zip |
Disable custom Git Hooks globally via configuration file (#2450)
* Create option to disable githooks globally via configuration file
* Update comment in app.ini to align with @ethantkoenig's suggestion
Signed-off-by: Matti Ranta <matti@mdranta.net>
Diffstat (limited to 'modules/setting')
-rw-r--r-- | modules/setting/setting.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go index 00aaad6913..721dd0f0f7 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -124,6 +124,7 @@ var ( ReverseProxyAuthUser string MinPasswordLength int ImportLocalPaths bool + DisableGitHooks bool // Database settings UseSQLite3 bool @@ -817,6 +818,7 @@ func NewContext() { ReverseProxyAuthUser = sec.Key("REVERSE_PROXY_AUTHENTICATION_USER").MustString("X-WEBAUTH-USER") MinPasswordLength = sec.Key("MIN_PASSWORD_LENGTH").MustInt(6) ImportLocalPaths = sec.Key("IMPORT_LOCAL_PATHS").MustBool(false) + DisableGitHooks = sec.Key("DISABLE_GIT_HOOKS").MustBool(false) InternalToken = sec.Key("INTERNAL_TOKEN").String() if len(InternalToken) == 0 { secretBytes := make([]byte, 32) |