Delete branch button is shown for users with Reporter access level, but it is not functional
Summary
Delete branch button is shown for users with Reporter access level, but it does not do anything when clicking it.
Steps to reproduce
- Create a project and add a member with Reporter access level there
- Create a new branch in this project
- Sign in as Reporter, go to Repository > Branches
Example Project
https://gitlab.com/atanayno/reporter-test-atanayno/
What is the current bug behavior?
Delete branch
button is shown there, but it is not functional - nothing happens if a Reporter clicks it.
What is the expected correct behavior?
According to the table Project members permissions, reporter should not be able to remove branches. So the button should not be visible to them or should be shows as Disabled.
Relevant logs and/or screenshots
Nothing is written to the browser console when clicking Delete branch
.
Output of checks
This bug happens on GitLab.com and on a self-managed instance of GitLab 15.3.2.
Possible fixes
Edited by Michael Le