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?
-
Changelog entry added, if necessary - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Closes #31294 (closed)
Merge request reports
Activity
- Resolved by Robert Speicher
mentioned in merge request !10926 (merged)
master
backport MR: !10926 (merged)mentioned in issue #31285 (closed)
mentioned in issue #31294 (closed)
- Resolved by Robert Speicher
assigned to @rymai
mentioned in merge request !10675 (merged)
added 1 commit
- 6cd9285f - Ensures that OAuth/LDAP/SAML users don't need to be confirmed
@rspeicher I've reduced the change to the minimum.
assigned to @rspeicher
enabled an automatic merge when the pipeline for 6cd9285f succeeds
added 4 commits
-
6cd9285f...4aec52ea - 2 commits from branch
9-1-stable
- 03940fb1 - Ensures that OAuth/LDAP/SAML users don't need to be confirmed
- 3e10797d - Fix logic in Users::CreateService broken by the fix for OAuth users
-
6cd9285f...4aec52ea - 2 commits from branch
- Resolved by username-removed-443319
assigned to @smcgivern
enabled an automatic merge when the pipeline for 3e10797d succeeds
mentioned in commit ad571dc4
@smcgivern I don't think we need to Pick into Stable because it's merged into
9-1-stable
directly.Oh, so it is!
/cc @dblessing