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
…go-gitea#24035)

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

- Resolves go-gitea#23392

Signed-off-by: Gary Moon <gary@garymoon.net>
  • Loading branch information
garymoon authored and GiteaBot committed Apr 25, 2023
1 parent b1094ff commit 0b95d94
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 0b95d94

Please sign in to comment.