]> source.dussan.org Git - gitea.git/commitdiff
AutoRegistration is supposed to be working with disabled registration (#17219)
authorViktor Kuzmin <kvaster@gmail.com>
Mon, 11 Oct 2021 16:23:59 +0000 (20:23 +0400)
committerGitHub <noreply@github.com>
Mon, 11 Oct 2021 16:23:59 +0000 (12:23 -0400)
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
routers/web/user/auth.go

index 12328e46a1657a96363a6056cad6b60f1ac9386d..65515402cf5d69d9bc05749f41fcd4f6e5aceccb 100644 (file)
@@ -628,7 +628,7 @@ func SignInOAuthCallback(ctx *context.Context) {
        }
 
        if u == nil {
-               if !(setting.Service.DisableRegistration || setting.Service.AllowOnlyInternalRegistration) && setting.OAuth2Client.EnableAutoRegistration {
+               if !setting.Service.AllowOnlyInternalRegistration && setting.OAuth2Client.EnableAutoRegistration {
                        // create new user with details from oauth2 provider
                        var missingFields []string
                        if gothUser.UserID == "" {