Skip to content

Ensures that OAuth/LDAP/SAML users don't need to be confirmed

What does this MR do?

This ensures user created via OAuth/LDAP/SAML don't need to confirm their email.

In some cases, OAuth generated users get an auto-generated email (https://gitlab.com/gitlab-org/gitlab-ce/blob/cc52dfab92116ca91fda37e07ad9cef21a62ce69/lib/gitlab/o_auth/auth_hash.rb#L57), and the Users::CreateService wasn't taking in account the skip_confirmation param if the current_user wasn't an admin (it would set it to !current_application_settings.send_user_confirmation_email in that case.

This MR fixes that by whitelisting :skip_confirmation when skip_authorization is true.

Why was this MR needed?

This caused bad LDAP regressions in 9.1.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #31294 (closed)

/cc @stanhu @felipe_artur @godfat

Merge request reports

Loading