Empty groups are not visible to users when using share with group
Summary
Users which are allowed to see (and even maintain) a group through share-with-group feature do not see the groups unless there is at least one project in it. Almost sure this is a duplicate but can't find any related issues, so I give this report a try.
Steps to reproduce
Gitlab EE - CORE 12.10.3-ee (7c0ab260)
Following organization:
- Users (group)
- Maintainers (group)
members:
- User 1 (owner of Users/Maintainers group)
- Maintainers (group)
members:
- Projects (group)
- Project 1 (group)
- SubProject 1 (group)
- Project 1 (group)
Projects/Project 1 is shared with Users/Maintainers, with Maintainer privileges Projects/Project 1 contains only a group[ SubProject 1 (which is empty), no project
What is the current bug behavior?
User 1 can't see Project 1 (and so nor SubProject 1) in group explore. However, it can access it directly through /projects/project1/subproject1 URL
If we create a project in Project 1 or SubProject 1 then it appears
What is the expected correct behavior?
User 1 should be able to see empty groups