From 4802c33acb2800676bd430166e4797fc4801e315 Mon Sep 17 00:00:00 2001 From: forgejo-backport-action Date: Fri, 14 Feb 2025 13:25:46 +0000 Subject: [PATCH] [v10.0/forgejo] fix: show internal login prompt for account linking (#6929) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Backport:** https://codeberg.org/forgejo/forgejo/pulls/6920 Fixes #6878. Co-authored-by: Matthias Riße Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6929 Reviewed-by: Gusted Co-authored-by: forgejo-backport-action Co-committed-by: forgejo-backport-action --- routers/web/auth/linkaccount.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/routers/web/auth/linkaccount.go b/routers/web/auth/linkaccount.go index 9b0141c14e..4b85250915 100644 --- a/routers/web/auth/linkaccount.go +++ b/routers/web/auth/linkaccount.go @@ -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"