Prevent associating runner with project from other organizations
requested to merge pedropombeiro/467237/prevent-associating-runner-with-project-from-other-org into master
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 reuseCi::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