mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
issue-2768: added new option allow_only_external_registration (#3910)
This commit is contained in:
@@ -741,7 +741,8 @@ func SignUpPost(ctx *context.Context, cpt *captcha.Captcha, form auth.RegisterFo
|
||||
|
||||
ctx.Data["EnableCaptcha"] = setting.Service.EnableCaptcha
|
||||
|
||||
if setting.Service.DisableRegistration {
|
||||
//Permission denied if DisableRegistration or AllowOnlyExternalRegistration options are true
|
||||
if !setting.Service.ShowRegistrationButton {
|
||||
ctx.Error(403)
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user