Skip to content

Commit 1bbbeb2

Browse files
GiteaBotgarymoon
andauthored
Respect the REGISTER_MANUAL_CONFIRM setting when registering via OIDC (#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]>
1 parent 1254a82 commit 1bbbeb2

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
@@ -963,7 +963,7 @@ func SignInOAuthCallback(ctx *context.Context) {
963963
}
964964

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

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

0 commit comments

Comments
 (0)