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)

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 <gary@garymoon.net>
  • Loading branch information
garymoon committed Apr 25, 2023
1 parent 74aa446 commit ab42c13
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 @@ -966,7 +966,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 ab42c13

Please sign in to comment.