Skip to content

Explicitly pass Organization when manually creating a Group

What does this MR do and why?

As part of Cells project, we are working on adding support for Organizations. One of the implications is that Groups should be assigned an Organization.

In this MR, we started to use Current.organization which will be set by future Cells router. However, Current is set in Rack Middleware and usage should be limited to request layer (controllers)

So we need to adapt all code paths that are using Groups::CreateService. In order to keep the MR's small, I decided to create a series of MR's:

As part of Cells project, we are working on adding support for Organizations. One of the implications is that Groups should be assigned an Organization.

In this MR, we started to use Current.organization which will be set by future Cells router. However, Current is set in Rack Middleware and usage should be limited to request layer (controllers)

So we need to adapt all code paths that are using Groups::CreateService. In order to keep the MR's small, I decided to create a series of MR's:

MR Description
149109 Pass organization explicitly for manually creation of groups
150147 Pass organization explicitly for group creation related to import
!150996 Remaining code paths
149111 Clean up

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

API Endpoint

Creating a new group should work as expected:

  • curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --data 'path=my-test-group&name=MyTestGroup' "http://localhost:3000/api/v4/groups"

Related to #443338

Edited by Rutger Wessels

Merge request reports