1
0
Fork 0
forked from forgejo/forgejo

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
}