Cannot invite group which I am not a member

Context

Imagine a platform with 3 users and 2 groups :

  • User Alice

  • User Alex

  • User Bob

  • Group "Yellow" which is internal and Alice is the only member

  • Group "Green" which is public and Alex is the only member

Intent

As Bob, I want to create a private Project "Hello Word" on my account and give access to any member of Green and Yellow. I want to give access through groups because :

  • I do not know who are the members of those groups
  • The members of those groups can change

Problem

Functional

When trying to invite a group, I see absolutely no group in the select box.

Technical

The select box issue a call to /api/v4/groups.json without the all_available flag set to true, therefore I only see the groups which I (Bob) am a member of. There is no such group, I get an empty list.

Note

This is a simplification. My actual use case is about using gitlab in a classroom, having student work on their project but give access to the teachers for reviewing. We have tried giving direct access but then the teachers have a ton of projects in their "my projects" list. We want to be allow the teacher to go to the lesson group and see all the shared projects there.

Also, some teachers join & leave after the projects are started, hence the need to invite a group and not directly a member.

Edited by Philippe Van Eerdenbrugghe