diff options
author | FabioFortini <FabioFortini@users.noreply.github.com> | 2018-05-13 09:51:16 +0200 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2018-05-13 15:51:16 +0800 |
commit | 1546458f7df4a4f0e77b7ae5cb65baed6feae394 (patch) | |
tree | aae745f69c31c4b9b808f901ca6dcc0fbd47857a /routers/user/auth.go | |
parent | e74055878f21c35e49faf2d17abb05e03bfe32e8 (diff) | |
download | gitea-1546458f7df4a4f0e77b7ae5cb65baed6feae394.tar.gz gitea-1546458f7df4a4f0e77b7ae5cb65baed6feae394.zip |
issue-2768: added new option allow_only_external_registration (#3910)
Diffstat (limited to 'routers/user/auth.go')
-rw-r--r-- | routers/user/auth.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/user/auth.go b/routers/user/auth.go index 2a5cb8e4b2..c8e1ada0db 100644 --- a/routers/user/auth.go +++ b/routers/user/auth.go @@ -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 } |