mirror of
https://github.com/go-gitea/gitea.git
synced 2024-05-11 05:55:29 +00:00
Block registration based on email domain (#5157)
* implement email domain whitelist
This commit is contained in:
committed by
techknowlogick
parent
4c1f1f9646
commit
b97af15de6
@@ -948,6 +948,11 @@ func SignUpPost(ctx *context.Context, cpt *captcha.Captcha, form auth.RegisterFo
|
||||
}
|
||||
}
|
||||
|
||||
if !form.IsEmailDomainWhitelisted() {
|
||||
ctx.RenderWithErr(ctx.Tr("auth.email_domain_blacklisted"), tplSignUp, &form)
|
||||
return
|
||||
}
|
||||
|
||||
if form.Password != form.Retype {
|
||||
ctx.Data["Err_Password"] = true
|
||||
ctx.RenderWithErr(ctx.Tr("form.password_not_match"), tplSignUp, &form)
|
||||
|
Reference in New Issue
Block a user