Welcome to mirror list, hosted at ThFree Co, Russian Federation.

share_project_with_groups.md « members « project « user « doc - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c4ae00f3c6c97079af356be616c0cd59475c1b1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
---
stage: Manage
group: Workspace
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
---

# Share projects with other groups **(FREE)**

You can share projects with other [groups](../../group/index.md). This makes it
possible to add a group of users to a project with a single action.

## Groups as collections of users

Groups are used primarily to [create collections of projects](../../group/index.md), but you can also
take advantage of the fact that groups define collections of _users_, namely the group
members.

## Share a project with a group of users

> - [Changed](https://gitlab.com/gitlab-org/gitlab/-/issues/247208) in GitLab 13.11 from a form to a modal
    window [with a flag](../../feature_flags.md). Disabled by default.
> - Modal window [enabled on GitLab.com and self-managed](https://gitlab.com/gitlab-org/gitlab/-/issues/247208)
    in GitLab 14.8.
> - [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/352526) in GitLab 14.9.
    [Feature flag `invite_members_group_modal`](https://gitlab.com/gitlab-org/gitlab/-/issues/352526) removed.

You can share a project only with:

- Groups for which you have an explicitly defined [membership](index.md).
- Groups that contain a nested subgroup or project for which you have an explicitly defined role.

Administrators can share projects with any group in the namespace.

The primary mechanism to give a group of users, say 'Engineering', access to a project,
say 'Project Acme', in GitLab is to make the 'Engineering' group the owner of 'Project
Acme'. But what if 'Project Acme' already belongs to another group, say 'Open Source'?
This is where the group sharing feature can be of use.

To share 'Project Acme' with the 'Engineering' group:

1. For 'Project Acme' use the left navigation menu to go to **Project information > Members**.
1. Select **Invite a group**.
1. Add the 'Engineering' group with the maximum access level of your choice.
1. Optional. Select an **Access expiration date**.
1. Select **Invite**.

After sharing 'Project Acme' with 'Engineering':

- The group is listed in the **Groups** tab.
- The project is listed on the group dashboard.

When you share a project, be aware of the following restrictions and outcomes:

- [Maximum access level](#maximum-access-level)
- [Sharing a public project with a private group](#share-a-public-project-with-private-group)
- [Sharing project with group lock](#share-project-with-group-lock)

## Maximum access level

In the example above, the maximum access level of 'Developer' for members from 'Engineering' means that users with higher access levels in 'Engineering' ('Maintainer' or 'Owner') only have 'Developer' access to 'Project Acme'.

### Share a project with a subgroup

You can't share a project with a group that's an ancestor of a [subgroup](../../group/subgroups/index.md) the project is
in. That means you can only share down the hierarchy. For example, `group/subgroup01/project`:

- Can not be shared with `group`.
- Can be shared with `group/subgroup02` or  `group/subgroup01/subgroup03`.

## Share a public project with private group

When you share a public project with a private group, be aware of the following outcomes:

- The name of the group is no longer private and is visible to all users in the project members page.
- Owners of the project have access to members of the private group when they mention them in issues or merge requests.
- Project members who are direct or indirect members of the private group can see private group members listed in addition to members of the project.

## Share project with group lock

It is possible to prevent projects in a group from [sharing
a project with another group](../members/share_project_with_groups.md).
This allows for tighter control over project access.

Learn more about [Share with group lock](../../group/index.md#prevent-a-project-from-being-shared-with-groups).