AutoRegistration is supposed to be working with disabled registration (#17219)

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
Viktor Kuzmin 2021-10-11 20:23:59 +04:00 committed by GitHub
parent d8e06a90f0
commit f2a5d1b42b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View 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 == "" {