mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-23 14:44:09 +01:00
ensure we don’t try changing LDAP passswords
This commit is contained in:
parent
cb1eadc276
commit
63e21c146a
2 changed files with 7 additions and 0 deletions
|
@ -162,6 +162,7 @@ reset_password = Reset Your Password
|
||||||
invalid_code = Sorry, your confirmation code has expired or not valid.
|
invalid_code = Sorry, your confirmation code has expired or not valid.
|
||||||
reset_password_helper = Click here to reset your password
|
reset_password_helper = Click here to reset your password
|
||||||
password_too_short = Password length cannot be less then 6.
|
password_too_short = Password length cannot be less then 6.
|
||||||
|
non_local_account = Non-local accounts cannot change passwords through Gogs.
|
||||||
|
|
||||||
[mail]
|
[mail]
|
||||||
activate_account = Please activate your account
|
activate_account = Please activate your account
|
||||||
|
|
|
@ -297,6 +297,12 @@ func ForgotPasswdPost(ctx *middleware.Context) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !u.IsLocal() {
|
||||||
|
ctx.Data["Err_Email"] = true
|
||||||
|
ctx.RenderWithErr(ctx.Tr("auth.non_local_account"), FORGOT_PASSWORD, nil)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if ctx.Cache.IsExist("MailResendLimit_" + u.LowerName) {
|
if ctx.Cache.IsExist("MailResendLimit_" + u.LowerName) {
|
||||||
ctx.Data["ResendLimited"] = true
|
ctx.Data["ResendLimited"] = true
|
||||||
ctx.HTML(200, FORGOT_PASSWORD)
|
ctx.HTML(200, FORGOT_PASSWORD)
|
||||||
|
|
Loading…
Reference in a new issue