From b1a7db7e2877a2803cae140f27d28251da25970b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Ri=C3=9Fe?= Date: Fri, 14 Feb 2025 12:45:15 +0000 Subject: [PATCH] fix: show internal login prompt for account linking (#6920) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #6878. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6920 Reviewed-by: Gusted Co-authored-by: Matthias Riße Co-committed-by: Matthias Riße --- 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 8dce0a30a4..e6c9089380 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" @@ -122,6 +123,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"