1
1
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:
FabioFortini
2018-05-13 09:51:16 +02:00
committed by Lunny Xiao
parent e74055878f
commit 1546458f7d
8 changed files with 20 additions and 2 deletions

View File

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