Remove organization validation exception from Authentication Controllers
What does this MR do and why?
In !155732 (merged), we added validation for presence of an Organization on Namespaces. Since this MR was already quite big and impactful, most 'Create Namespace' code paths are wrapped in a Namespace.with_disabled_organization_validation
method, which caused the validation to be skipped.
This MR removes these Namespace.with_disabled_organization_validation
for Omniauth related controllers. We can rely on the Current.organization
.
I had to introduce an extra parameter for the Gitlab::Auth::OAuth::User.new
methods. I am not 100% sure. But the alternative was to modify Gitlab::Auth::*::AuthHash
classes and I felt that was not the way to go.
So I added a user_params
hash that will be passed to the BuildService for the new user.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #411832 (closed)