Skip to content

Add register_group_runners rule to GroupPolicy

Pedro Pombeiro requested to merge pedropombeiro/348337/add-group-policy into master

What does this MR do and why?

Describe in detail what your merge request does and why.

This MR introduces a new :register_group_runners rule in GroupPolicy. This allows us to replace a usage where frontend is testing for the :admin_pipeline permission in order to determine whether to show the setup instructions for a group runner.

A similar MR was recently merged: !76682 (merged)

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

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

  1. In rails console enable runner registration control

    Feature.enable(:runner_registration_control)
  2. Visit http://gdk.test:3000/admin/application_settings/ci_cd#js-runner-settings on your GDK

    1. In the Runner registration section, disable the Members of the group can register runners checkbox
  3. Visit the Settings -> CI/CD -> Runners section for a project that is the child of a group, e.g. http://gdk.test:3000/groups/h5bp/-/settings/ci_cd. The Group runners section should look like this:

    2021-12-15_at_18.55

  4. Retry step 2, this time enabling the checkbox.

  5. In the screen described in step 3, you should now see the following:

    2021-12-15_at_18.58

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Closes #348337 (closed)

Edited by Pedro Pombeiro

Merge request reports

Loading