aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGary Moon <garymoon@users.noreply.github.com>2023-04-25 02:40:48 -0400
committerGitHub <noreply@github.com>2023-04-25 14:40:48 +0800
commitab42c139a246be8905bae2e87a41aef9ecbe06f7 (patch)
treeb2602c9840de49b66e115ca46b06c309ec3d8657
parent74aa44625bb0cef4430385f9e30e211dc02b55e9 (diff)
downloadgitea-ab42c139a246be8905bae2e87a41aef9ecbe06f7.tar.gz
gitea-ab42c139a246be8905bae2e87a41aef9ecbe06f7.zip
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 https://github.com/go-gitea/gitea/issues/23392 Signed-off-by: Gary Moon <gary@garymoon.net>
-rw-r--r--routers/web/auth/oauth.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/auth/oauth.go b/routers/web/auth/oauth.go
index 287136e64c..92a06e7c14 100644
--- a/routers/web/auth/oauth.go
+++ b/routers/web/auth/oauth.go
@@ -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)