diff options
author | zeripath <art27@cantab.net> | 2019-10-19 15:27:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-19 15:27:15 +0100 |
commit | 5a62ae5cbf47cf6537f6c95aba4b1d04dea5f5af (patch) | |
tree | 088421b1f75a9a0d95d182f3a5a339c66f5a9d1d /modules/setting/service.go | |
parent | 280f4bebbf5883eef94d8a84b21575393ae5e0e1 (diff) | |
download | gitea-5a62ae5cbf47cf6537f6c95aba4b1d04dea5f5af.tar.gz gitea-5a62ae5cbf47cf6537f6c95aba4b1d04dea5f5af.zip |
Add setting to disable BASIC authentication (#8586)
Closes #8561.
Diffstat (limited to 'modules/setting/service.go')
-rw-r--r-- | modules/setting/service.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/setting/service.go b/modules/setting/service.go index 905b1326f7..dea4081ee8 100644 --- a/modules/setting/service.go +++ b/modules/setting/service.go @@ -23,6 +23,7 @@ var Service struct { ShowRegistrationButton bool RequireSignInView bool EnableNotifyMail bool + EnableBasicAuth bool EnableReverseProxyAuth bool EnableReverseProxyAutoRegister bool EnableReverseProxyEmail bool @@ -60,6 +61,7 @@ func newService() { Service.EmailDomainWhitelist = sec.Key("EMAIL_DOMAIN_WHITELIST").Strings(",") Service.ShowRegistrationButton = sec.Key("SHOW_REGISTRATION_BUTTON").MustBool(!(Service.DisableRegistration || Service.AllowOnlyExternalRegistration)) Service.RequireSignInView = sec.Key("REQUIRE_SIGNIN_VIEW").MustBool() + Service.EnableBasicAuth = sec.Key("ENABLE_BASIC_AUTHENTICATION").MustBool(true) Service.EnableReverseProxyAuth = sec.Key("ENABLE_REVERSE_PROXY_AUTHENTICATION").MustBool() Service.EnableReverseProxyAutoRegister = sec.Key("ENABLE_REVERSE_PROXY_AUTO_REGISTRATION").MustBool() Service.EnableReverseProxyEmail = sec.Key("ENABLE_REVERSE_PROXY_EMAIL").MustBool() |