Fork / create project / move targets do not include groups where membership is granted via group
Summary
The dropdowns in forms like fork / move project / create project only contain groups where you are either a direct member or a member of a parent group. If you are only member of a second group that in turn is granted membership of the target group, that target group is missing.
For example
- you are member of Group A
- Group B contains Group A in the "Groups" section of the "Group members" page
- The dropdown will only include Group A, and not Group B, although you otherwise have proper permissions to Group B as configured.
Steps to reproduce
- Create Group A
- Create Group B
- Add Group A as member of Group B in the "Groups" tab of the "Group members" page of Group B, with e.g. maintainer role
- Create / choose a second user
- Add this user as member of group A
- Try to create a new project, move an existing one, or fork an existing one and observe the target group dropdown.
Example Project
What is the current bug behavior?
The target group dropdown will only list Group A, but not Group B
What is the expected correct behavior?
The target group dropdown should list both Group A and Group B
Relevant logs and/or screenshots
Output of checks
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)