Add allow_sign_up override for auth.google/github.

This commit is contained in:
Jason Harvey
2015-04-09 17:15:19 -08:00
parent a446286869
commit ddaac50a25
5 changed files with 26 additions and 3 deletions

View File

@@ -63,7 +63,7 @@ func OAuthLogin(ctx *middleware.Context) {
// create account if missing
if err == m.ErrUserNotFound {
if !setting.AllowUserSignUp {
if !connect.IsSignupAllowed() {
ctx.Redirect(setting.AppSubUrl + "/login")
return
}