Skip to content

Enable Organization Presence validation in Registration controllers

Rutger Wessels requested to merge 411832-remove-exception-for-registration into master

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 will pass Current.organization_id to the Users::RegistrationsBuildService.

The effect is that the Personal Namespace of the User will be created using the Current Organization. On self-managed and SaaS, this will fallback to the Default Organization.

There are many specs for this. Most specs can be fixed by ensuring Current.organization has a valid value. This is accomplished by adding the :with_current_organization to the RSpec metadata. This will create an organization and use this as Current.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.

How to set up and validate locally

Using GDK, signup at http://gdk.test/users/sign_up

It should work the same as with master branch.

Related to #411832 (closed)

Edited by Rutger Wessels

Merge request reports

Loading