Group Protected Branch Cannot Choose a User
Summary
In my SM instance and I'm having issue when I choose a user to allow merge/push for group level protected branches. From the Allowed to merge/push list
field, I choose Maintainers and a user (Administrator@root
user in my example). However, the user I choose is not set as you can see from screenshots. It shows as 2 roles but user is not chosen in the UI either. I also checked audit events and it shows as [allowed to push: ["Maintainers", "Maintainers"].
When I tried with project settings, it worked as expected too. But seems like Group level is not working correct for users.
Reported in Slack
Steps to reproduce
-
Enable the feature flag named
group_protected_branches
- On the top bar, select Main menu > Groups and find your group.
- On the left sidebar, select Settings > Repository.
- Expand Protected branches.
- In the Branch text box, type the branch name or a wildcard.
- From the Allowed to merge list, select a user that can merge into this branch.
- From the Allowed to push list, select a user that can push to this branch.
- Select Protect.
Example Project
What is the current bug behavior?
When a user is chosen from the Allowed to merge/push list
, it is saved as Maintainers
What is the expected correct behavior?
When a user is chosen from the Allowed to merge/push list
, it is must be saved as the user we choose.
Relevant logs and/or screenshots
Output of checks
I can't reproduce on GitLab because the feature flag should be enabled by an administrator.
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)