Make project private from owning group

Hello,

I have been set as owner of a subgroup in an organization (let’s call it myorg/mygroup) with a project that’s under this subgroup (let’s call it myorg/mygroup/myproject).
I have been tasked with making this project private from the group (that is only members of mygroup that have been explicitly invited as members to this project should be able to see its content) while currently all members of the group have been assigned as members of the project automatically by inheritance (thus all members of mygroup can access myproject freely). To this end, setting the project as private is not enough since the group members are all automatically added as team members.

I have been reading through GitLab’s documentation but could not find any reference to a way to achieve this except for old issues/discussions without any solutions. It appears even creating a subgroup would not work since all members of the supergroup would automatically be added to the subgroup.

Is it even possible to hide a project owned by a group from some members of this group and if yes, how can I do it ?

Thanks in advance

If you go to the members page under Project information you will probably see that inherited members do not have a Remove member button, nor can you set an expiration date for them. I could be wrong, but I don’t think you can make this work, given how groups currently work.

What I do to solve the same problem, is to have a more complex hierarchy:

group
  |
  |--> subgroup1
  |--> subgroup2
  |     ...
  |--> group_for_members_with_restricted_rights

The group_for_members... contains no projects, it’s just a placeholder for a group of users with developer rights. Then, when I want that group to have access to only some shared projects or subgroups, I add the whole group to that project or subgroup. This means that I’m not constantly having to keep track of who is in which group or project, and adding / removing developers is very simple.

This may not be quite what you want, but I think you will need to consider something more complex than just one group.

1 Like