Skip to content

Commit

Permalink
Respect the REGISTER_MANUAL_CONFIRM setting when registering via OIDC (
Browse files Browse the repository at this point in the history
…#24035) (#24333)

Backport #24035 by @garymoon

This change prevents Gitea from bypassing the manual approval process
for newly registered users when OIDC is used.

- Resolves #23392

Signed-off-by: Gary Moon <[email protected]>
Co-authored-by: Gary Moon <[email protected]>
  • Loading branch information
GiteaBot and garymoon authored Apr 25, 2023
1 parent 1254a82 commit 1bbbeb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routers/web/auth/oauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@ func SignInOAuthCallback(ctx *context.Context) {
}

overwriteDefault := &user_model.CreateUserOverwriteOptions{
IsActive: util.OptionalBoolOf(!setting.OAuth2Client.RegisterEmailConfirm),
IsActive: util.OptionalBoolOf(!setting.OAuth2Client.RegisterEmailConfirm && !setting.Service.RegisterManualConfirm),
}

source := authSource.Cfg.(*oauth2.Source)
Expand Down

0 comments on commit 1bbbeb2

Please sign in to comment.