Skip to content

Add managing protected branches as custom permission

Jarka Košanová requested to merge 448823-protected-branches-cr into master

What does this MR do and why?

It adds managing protected branches as a custom permission. This MR depends on !152152 (merged), tests will be failing until that one is merged.

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

Screen_Recording_2024-05-06_at_9.28.30

How to set up and validate locally

  1. Pick a project and a user who is max developer of that project
  2. Go to the project repository settgins, eg. http://gdk.test:3000/flightjs/Flight/-/settings/repository - you should get 404.
  3. Create a new custom role that enables managing protected branches (you can do it in admin interface, if you are on self-managed, eg. http://gdk.test:3000/admin/application_settings/roles_and_permissions)
  4. Visit any group or project member pages such as http://gdk.test:3000/flightjs/Flight/-/project_members
  5. Assign the created custom role to the selected user
  6. Log in as the selected user
  7. Go to the project page, you should be able to access Settings - Repository and then see only protected branches section. Play around with protected branches.
  8. You should be able to access also protected branches API endpoints

Related to #448823

Edited by Jarka Košanová

Merge request reports