[v10.0/forgejo] fix: show internal login prompt for account linking (#6929)

**Backport:** https://codeberg.org/forgejo/forgejo/pulls/6920

Fixes #6878.

Co-authored-by: Matthias Riße <m.risse@fz-juelich.de>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6929
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
This commit is contained in:
forgejo-backport-action 2025-02-14 13:25:46 +00:00 committed by Gusted
parent c56bbddf62
commit 4802c33acb

View file

@ -44,6 +44,7 @@ func LinkAccount(ctx *context.Context) {
ctx.Data["DisableRegistration"] = setting.Service.DisableRegistration
ctx.Data["AllowOnlyInternalRegistration"] = setting.Service.AllowOnlyInternalRegistration
ctx.Data["ShowRegistrationButton"] = false
ctx.Data["EnableInternalSignIn"] = true
// use this to set the right link into the signIn and signUp templates in the link_account template
ctx.Data["SignInLink"] = setting.AppSubURL + "/user/link_account_signin"
@ -132,6 +133,7 @@ func LinkAccountPostSignIn(ctx *context.Context) {
ctx.Data["CfTurnstileSitekey"] = setting.Service.CfTurnstileSitekey
ctx.Data["DisableRegistration"] = setting.Service.DisableRegistration
ctx.Data["ShowRegistrationButton"] = false
ctx.Data["EnableInternalSignIn"] = true
// use this to set the right link into the signIn and signUp templates in the link_account template
ctx.Data["SignInLink"] = setting.AppSubURL + "/user/link_account_signin"