- Example
- Prerequisites
- Share a project with a group
- Maximum role
- View a group’s shared projects
- Related topics
Share a project with a group
When you want a group to have access to your project, you can invite a group to the project. The group’s direct and inherited members get access to the project, which becomes a shared project.
Example
For a project that was created by Group 1
:
- The members of
Group 1
have access to the project. - The owner of
Group 1
can inviteGroup 2
to the project. This way, members of bothGroup 1
andGroup 2
have access to the shared project.
Prerequisites
To invite a group to a project, you must be at least one of the following:
- Explicitly defined as a member of the project.
- Explicitly defined as a member of a group or subgroup that has access to the project.
- An administrator.
In addition:
-
You must be a member of the group or the subgroup being invited.
- The visibility level of the group you’re inviting
must be at least as restrictive as that of the project. For example, you can invite:
- A private group to a private project
- A private group to an internal project.
- A private group to a public project.
- An internal group to an internal project.
- An internal group to a public project.
- A public group to a public project.
- If the project’s root ancestor group does not allow the project to be shared outside the hierarchy, the invited group or subgroup must be in the project’s namespace.
For example, a project in the namespace
group/subgroup01/project
:- Can be shared with
group/subgroup02
orgroup/subgroup01/subgroup03
. - Cannot be shared with
group_abc
.
- Can be shared with
Share a project with a group
- Changed in GitLab 13.11 from a form to a modal window with a flag. Disabled by default.
- Modal window enabled on GitLab.com and self-managed in GitLab 14.8.
-
Generally available in GitLab 14.9.
Feature flag
invite_members_group_modal
removed.
Similar to how you share a group with another group, you can share a project with a group by inviting that group to the project.
To invite a group to a project:
- On the left sidebar, select Search or go to and find your project.
- Select Manage > Members.
- Select Invite a group.
- Select a group you want to add to the project.
- Select a role you want to assign to the group.
- Optional. Select an Access expiration date.
- Select Invite.
The following members are given access to the project:
- All direct group members.
- Inherited group members.
- Members of other groups that have access to the group being invited (by group share)
In addition:
- On the group’s page, the project is listed on the Shared projects tab.
- On the project’s Members page, the group is listed on the Groups tab.
- Each user is assigned a maximum role.
- Members who have the Project Invite badge next to their profile on the usage quota page count towards the billable members of the shared project’s top-level group.
Maximum role
When you invite a group to a project, the maximum role is the highest level of access the invited group members are allowed to have in the project.
When multiple groups contain the same members, and the groups have access to the same project, the group members are given the highest access level of the two for the project.
The member’s Max role is the more restrictive of:
- The role the user is assigned for the group.
- The role you chose when you invited the group to the project.
View the member’s Max role
To view the maximum role assigned to a member:
- On the left sidebar, select Search or go to and find your project.
- Select Manage > Members.
- In the Max role column, view the user’s maximum assigned role.
View a group’s shared projects
In a group, a shared project is a project to which the group members gained access through the Invite group action.
To view a group’s shared projects:
- On the left sidebar, select Search or go to and find your group.
- On the group page, select the Shared projects tab.
A list of shared projects is displayed.