Skip to content

Enable Organization Presence validation for ProvisioningService classes

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 ensures we explicitly pass an Organization ID when calling ::EE::Gitlab::Scim::ProvisioningService. For ::EE::Gitlab::Scim::Group::ProvisioningService, we can use the organization of the group.

Since this service only makes sense on self-managed, we can use the Default Organization

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

Merge request reports