mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-06-23 08:00:02 +02:00
fix: disable forgotten password for external signin only (#6680)
- Make it such that `[service].ENABLE_INTERNAL_SIGNIN = false` disables the forgotten password prompt on the login page. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6680 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: davrot <davrot@noreply.codeberg.org> Co-committed-by: davrot <davrot@noreply.codeberg.org>
This commit is contained in:
parent
6a0ebf8557
commit
252f7da557
3 changed files with 45 additions and 0 deletions
|
@ -171,6 +171,8 @@ func SignIn(ctx *context.Context) {
|
|||
context.SetCaptchaData(ctx)
|
||||
}
|
||||
|
||||
ctx.Data["DisablePassword"] = !setting.Service.EnableInternalSignIn
|
||||
|
||||
ctx.HTML(http.StatusOK, tplSignIn)
|
||||
}
|
||||
|
||||
|
@ -190,6 +192,7 @@ func SignInPost(ctx *context.Context) {
|
|||
ctx.Data["PageIsLogin"] = true
|
||||
ctx.Data["EnableSSPI"] = auth.IsSSPIEnabled(ctx)
|
||||
ctx.Data["EnableInternalSignIn"] = setting.Service.EnableInternalSignIn
|
||||
ctx.Data["DisablePassword"] = !setting.Service.EnableInternalSignIn
|
||||
|
||||
// Permission denied if EnableInternalSignIn is false
|
||||
if !setting.Service.EnableInternalSignIn {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue