mirror of
https://github.com/go-gitea/gitea.git
synced 2024-12-04 14:46:57 -05:00
Set HCaptchaSiteKey on Link Account pages (#14834)
When using HCaptcha on link account pages the site key needs to be passed in. This PR ensures that HCaptchaSiteKey is set in the data. Fix #14766 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
parent
83cf1a894e
commit
030646eea4
@ -751,6 +751,7 @@ func LinkAccount(ctx *context.Context) {
|
|||||||
ctx.Data["CaptchaType"] = setting.Service.CaptchaType
|
ctx.Data["CaptchaType"] = setting.Service.CaptchaType
|
||||||
ctx.Data["RecaptchaURL"] = setting.Service.RecaptchaURL
|
ctx.Data["RecaptchaURL"] = setting.Service.RecaptchaURL
|
||||||
ctx.Data["RecaptchaSitekey"] = setting.Service.RecaptchaSitekey
|
ctx.Data["RecaptchaSitekey"] = setting.Service.RecaptchaSitekey
|
||||||
|
ctx.Data["HcaptchaSitekey"] = setting.Service.HcaptchaSitekey
|
||||||
ctx.Data["DisableRegistration"] = setting.Service.DisableRegistration
|
ctx.Data["DisableRegistration"] = setting.Service.DisableRegistration
|
||||||
ctx.Data["ShowRegistrationButton"] = false
|
ctx.Data["ShowRegistrationButton"] = false
|
||||||
|
|
||||||
@ -804,6 +805,7 @@ func LinkAccountPostSignIn(ctx *context.Context) {
|
|||||||
ctx.Data["Captcha"] = context.GetImageCaptcha()
|
ctx.Data["Captcha"] = context.GetImageCaptcha()
|
||||||
ctx.Data["CaptchaType"] = setting.Service.CaptchaType
|
ctx.Data["CaptchaType"] = setting.Service.CaptchaType
|
||||||
ctx.Data["RecaptchaSitekey"] = setting.Service.RecaptchaSitekey
|
ctx.Data["RecaptchaSitekey"] = setting.Service.RecaptchaSitekey
|
||||||
|
ctx.Data["HcaptchaSitekey"] = setting.Service.HcaptchaSitekey
|
||||||
ctx.Data["DisableRegistration"] = setting.Service.DisableRegistration
|
ctx.Data["DisableRegistration"] = setting.Service.DisableRegistration
|
||||||
ctx.Data["ShowRegistrationButton"] = false
|
ctx.Data["ShowRegistrationButton"] = false
|
||||||
|
|
||||||
@ -890,6 +892,7 @@ func LinkAccountPostRegister(ctx *context.Context) {
|
|||||||
ctx.Data["Captcha"] = context.GetImageCaptcha()
|
ctx.Data["Captcha"] = context.GetImageCaptcha()
|
||||||
ctx.Data["CaptchaType"] = setting.Service.CaptchaType
|
ctx.Data["CaptchaType"] = setting.Service.CaptchaType
|
||||||
ctx.Data["RecaptchaSitekey"] = setting.Service.RecaptchaSitekey
|
ctx.Data["RecaptchaSitekey"] = setting.Service.RecaptchaSitekey
|
||||||
|
ctx.Data["HcaptchaSitekey"] = setting.Service.HcaptchaSitekey
|
||||||
ctx.Data["DisableRegistration"] = setting.Service.DisableRegistration
|
ctx.Data["DisableRegistration"] = setting.Service.DisableRegistration
|
||||||
ctx.Data["ShowRegistrationButton"] = false
|
ctx.Data["ShowRegistrationButton"] = false
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user