Skip to content

Prevent associating runner with project from other organizations

What does this MR do and why?

This MR implements a safeguard to prevent sharing a project runner with a project from a different organization.

It does so by:

  • Updating Ci::Runners::AssignRunnerService to check that the new project is from the same organization as the owner project.
  • Updating Ci::Runners::SetRunnerAssociatedProjectsService to reuse Ci::Runners::AssignRunnerService, so we reuse as much logic and messages as possible.

Closes #467237 (closed)

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.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

n/a

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

I'm relying on unit tests to test the changes.

Edited by Pedro Pombeiro

Merge request reports