fix: show internal login prompt for account linking (#6920)

Fixes #6878.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6920
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Matthias Riße <m.risse@fz-juelich.de>
Co-committed-by: Matthias Riße <m.risse@fz-juelich.de>
This commit is contained in:
Matthias Riße 2025-02-14 12:45:15 +00:00 committed by Gusted
parent c58d282f3d
commit b1a7db7e28

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"
@ -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"