diff options
author | AJ ONeal <coolaj86@gmail.com> | 2019-07-06 13:48:02 -0600 |
---|---|---|
committer | techknowlogick <techknowlogick@gitea.io> | 2019-07-06 15:48:02 -0400 |
commit | 62d6127f1b945b3160d337a190b33aa96e0f60b5 (patch) | |
tree | e7cee9a32d2c6922eec0839515dd4f76bb6d8232 /modules/setting | |
parent | 337d6915ff8967637ff515108612c3a7a4f51585 (diff) | |
download | gitea-62d6127f1b945b3160d337a190b33aa96e0f60b5.tar.gz gitea-62d6127f1b945b3160d337a190b33aa96e0f60b5.zip |
Make captcha and password optional for external accounts (#6606)
Diffstat (limited to 'modules/setting')
-rw-r--r-- | modules/setting/service.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/setting/service.go b/modules/setting/service.go index 7e4fb8d7d9..97babc5aaf 100644 --- a/modules/setting/service.go +++ b/modules/setting/service.go @@ -27,6 +27,8 @@ var Service struct { EnableReverseProxyAutoRegister bool EnableReverseProxyEmail bool EnableCaptcha bool + RequireExternalRegistrationCaptcha bool + RequireExternalRegistrationPassword bool CaptchaType string RecaptchaSecret string RecaptchaSitekey string @@ -61,6 +63,8 @@ func newService() { Service.EnableReverseProxyAutoRegister = sec.Key("ENABLE_REVERSE_PROXY_AUTO_REGISTRATION").MustBool() Service.EnableReverseProxyEmail = sec.Key("ENABLE_REVERSE_PROXY_EMAIL").MustBool() Service.EnableCaptcha = sec.Key("ENABLE_CAPTCHA").MustBool(false) + Service.RequireExternalRegistrationCaptcha = sec.Key("REQUIRE_EXTERNAL_REGISTRATION_CAPTCHA").MustBool(Service.EnableCaptcha) + Service.RequireExternalRegistrationPassword = sec.Key("REQUIRE_EXTERNAL_REGISTRATION_PASSWORD").MustBool() Service.CaptchaType = sec.Key("CAPTCHA_TYPE").MustString(ImageCaptcha) Service.RecaptchaSecret = sec.Key("RECAPTCHA_SECRET").MustString("") Service.RecaptchaSitekey = sec.Key("RECAPTCHA_SITEKEY").MustString("") |