Skip to content

Commit ab42c13

Browse files
authored
Respect the REGISTER_MANUAL_CONFIRM setting when registering via OIDC (#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 <[email protected]>
1 parent 74aa446 commit ab42c13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/web/auth/oauth.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -966,7 +966,7 @@ func SignInOAuthCallback(ctx *context.Context) {
966966
}
967967

968968
overwriteDefault := &user_model.CreateUserOverwriteOptions{
969-
IsActive: util.OptionalBoolOf(!setting.OAuth2Client.RegisterEmailConfirm),
969+
IsActive: util.OptionalBoolOf(!setting.OAuth2Client.RegisterEmailConfirm && !setting.Service.RegisterManualConfirm),
970970
}
971971

972972
source := authSource.Cfg.(*oauth2.Source)

0 commit comments

Comments
 (0)