mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-23 08:47:42 -05:00
Merge pull request '[gitea] week 2024-35-v7.0 cherry pick (release/v1.22 -> v7.0/forgejo)' (#5113) from earl-warren/wcp/2024-35-v7.0 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5113 Reviewed-by: Gusted <gusted@noreply.codeberg.org>
This commit is contained in:
commit
47cd797dd3
3 changed files with 5 additions and 0 deletions
1
release-notes/5113.md
Normal file
1
release-notes/5113.md
Normal file
|
@ -0,0 +1 @@
|
||||||
|
fix: [Add CfTurnstileSitekey context data to all captcha templates](https://codeberg.org/forgejo/forgejo/commit/bf07064e40472daa22063d0ac1fb3653008497eb).
|
|
@ -40,6 +40,7 @@ func LinkAccount(ctx *context.Context) {
|
||||||
ctx.Data["HcaptchaSitekey"] = setting.Service.HcaptchaSitekey
|
ctx.Data["HcaptchaSitekey"] = setting.Service.HcaptchaSitekey
|
||||||
ctx.Data["McaptchaSitekey"] = setting.Service.McaptchaSitekey
|
ctx.Data["McaptchaSitekey"] = setting.Service.McaptchaSitekey
|
||||||
ctx.Data["McaptchaURL"] = setting.Service.McaptchaURL
|
ctx.Data["McaptchaURL"] = setting.Service.McaptchaURL
|
||||||
|
ctx.Data["CfTurnstileSitekey"] = setting.Service.CfTurnstileSitekey
|
||||||
ctx.Data["DisableRegistration"] = setting.Service.DisableRegistration
|
ctx.Data["DisableRegistration"] = setting.Service.DisableRegistration
|
||||||
ctx.Data["AllowOnlyInternalRegistration"] = setting.Service.AllowOnlyInternalRegistration
|
ctx.Data["AllowOnlyInternalRegistration"] = setting.Service.AllowOnlyInternalRegistration
|
||||||
ctx.Data["ShowRegistrationButton"] = false
|
ctx.Data["ShowRegistrationButton"] = false
|
||||||
|
@ -128,6 +129,7 @@ func LinkAccountPostSignIn(ctx *context.Context) {
|
||||||
ctx.Data["HcaptchaSitekey"] = setting.Service.HcaptchaSitekey
|
ctx.Data["HcaptchaSitekey"] = setting.Service.HcaptchaSitekey
|
||||||
ctx.Data["McaptchaSitekey"] = setting.Service.McaptchaSitekey
|
ctx.Data["McaptchaSitekey"] = setting.Service.McaptchaSitekey
|
||||||
ctx.Data["McaptchaURL"] = setting.Service.McaptchaURL
|
ctx.Data["McaptchaURL"] = setting.Service.McaptchaURL
|
||||||
|
ctx.Data["CfTurnstileSitekey"] = setting.Service.CfTurnstileSitekey
|
||||||
ctx.Data["DisableRegistration"] = setting.Service.DisableRegistration
|
ctx.Data["DisableRegistration"] = setting.Service.DisableRegistration
|
||||||
ctx.Data["ShowRegistrationButton"] = false
|
ctx.Data["ShowRegistrationButton"] = false
|
||||||
|
|
||||||
|
@ -215,6 +217,7 @@ func LinkAccountPostRegister(ctx *context.Context) {
|
||||||
ctx.Data["HcaptchaSitekey"] = setting.Service.HcaptchaSitekey
|
ctx.Data["HcaptchaSitekey"] = setting.Service.HcaptchaSitekey
|
||||||
ctx.Data["McaptchaSitekey"] = setting.Service.McaptchaSitekey
|
ctx.Data["McaptchaSitekey"] = setting.Service.McaptchaSitekey
|
||||||
ctx.Data["McaptchaURL"] = setting.Service.McaptchaURL
|
ctx.Data["McaptchaURL"] = setting.Service.McaptchaURL
|
||||||
|
ctx.Data["CfTurnstileSitekey"] = setting.Service.CfTurnstileSitekey
|
||||||
ctx.Data["DisableRegistration"] = setting.Service.DisableRegistration
|
ctx.Data["DisableRegistration"] = setting.Service.DisableRegistration
|
||||||
ctx.Data["ShowRegistrationButton"] = false
|
ctx.Data["ShowRegistrationButton"] = false
|
||||||
|
|
||||||
|
|
|
@ -307,6 +307,7 @@ func RegisterOpenID(ctx *context.Context) {
|
||||||
ctx.Data["RecaptchaURL"] = setting.Service.RecaptchaURL
|
ctx.Data["RecaptchaURL"] = setting.Service.RecaptchaURL
|
||||||
ctx.Data["McaptchaSitekey"] = setting.Service.McaptchaSitekey
|
ctx.Data["McaptchaSitekey"] = setting.Service.McaptchaSitekey
|
||||||
ctx.Data["McaptchaURL"] = setting.Service.McaptchaURL
|
ctx.Data["McaptchaURL"] = setting.Service.McaptchaURL
|
||||||
|
ctx.Data["CfTurnstileSitekey"] = setting.Service.CfTurnstileSitekey
|
||||||
ctx.Data["OpenID"] = oid
|
ctx.Data["OpenID"] = oid
|
||||||
userName, _ := ctx.Session.Get("openid_determined_username").(string)
|
userName, _ := ctx.Session.Get("openid_determined_username").(string)
|
||||||
if userName != "" {
|
if userName != "" {
|
||||||
|
|
Loading…
Reference in a new issue