Skip to content

Allow groups to be added to the inbound allowlist

What does this MR do and why?

For #415519

Allow groups to be added to the inbound allowlist

Modify table to be usable for both groups and projects
Accept group paths in the form, use the mutation that can handle both
When removing, call either the group or project mutation
Add group count to table/card header
Update UI text that refers to projects to refer to groups and projects
Update tests

Changelog: added

Implementation plan

See #415519#implementation-plan

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

Scenario Before After
- see design for comparison
- this doesn't fully match the design yet, there are more MRs to come
setting disabled Screenshot_2024-05-01_at_14.14.30 Screenshot_2024-05-01_at_14.09.01
changes:
- toggle help text has been reworded and made into a description instead
- deprecation alert has been reworded and moved above the table
setting enabled Screenshot_2024-05-01_at_14.14.37 Screenshot_2024-05-01_at_14.08.41
changes:
- table shows groups and projects with counts for each in the header
- UI text now refers to groups and/or projects
- delete buttons are no longer danger variant
- table sub-header Project with access has been removed
adding and removing items Screen_Recording_2024-05-01_at_14.14.41 Screen_Recording_2024-05-01_at_14.09.10
changes: form accepts group paths, otherwise remains the same

How to set up and validate locally

  1. navigate to a project
  2. in the sidebar, choose Settings => CI/CD
  3. expand the Token Access section
  4. disable the Limit access to this project toggle and make sure the No access is currently allowed to this project... alert is shown
  5. enable the Limit access to this project toggle, the alert should go away
  6. the following new actions should now be available:
    • add a group to the allowlist (click Add group or project and paste gitlab-org)
    • remove a group from the allowlist (click the delete button next to the group)
  7. the following existing actions should still work:
    • add a project to the allowlist (click Add group or project and paste gitlab-org/gitlab-test)
    • remove a project from the allowlist (click the delete button next to the project)
Edited by Miranda Fluharty

Merge request reports