Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
bb99fc25
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
bb99fc25
编写于
3月 07, 2017
作者:
A
Achilleas Pipinellis
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add nested groups documentation
[ci skip]
上级
b0905366
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
155 addition
and
0 deletion
+155
-0
doc/user/group/subgroups/img/create_new_group.png
doc/user/group/subgroups/img/create_new_group.png
+0
-0
doc/user/group/subgroups/img/create_subgroup_button.png
doc/user/group/subgroups/img/create_subgroup_button.png
+0
-0
doc/user/group/subgroups/img/group_members.png
doc/user/group/subgroups/img/group_members.png
+0
-0
doc/user/group/subgroups/img/mention_subgroups.png
doc/user/group/subgroups/img/mention_subgroups.png
+0
-0
doc/user/group/subgroups/index.md
doc/user/group/subgroups/index.md
+153
-0
doc/user/permissions.md
doc/user/permissions.md
+1
-0
doc/workflow/README.md
doc/workflow/README.md
+1
-0
未找到文件。
doc/user/group/subgroups/img/create_new_group.png
0 → 100644
浏览文件 @
bb99fc25
18.1 KB
doc/user/group/subgroups/img/create_subgroup_button.png
0 → 100644
浏览文件 @
bb99fc25
8.2 KB
doc/user/group/subgroups/img/group_members.png
0 → 100644
浏览文件 @
bb99fc25
47.1 KB
doc/user/group/subgroups/img/mention_subgroups.png
0 → 100644
浏览文件 @
bb99fc25
38.7 KB
doc/user/group/subgroups/index.md
0 → 100644
浏览文件 @
bb99fc25
# Subgroups
> [Introduced][ce-2772] in GitLab 9.0.
With subgroups (also called nested groups or hierarchical groups) you can have
up to 20 levels of nested groups, which among other things can help you to:
-
**Separate internal / external organizations.**
Since every group
can have its own visibility level, you are able to host groups for different
purposes under the same umbrella.
-
**Organize large projects.**
For large projects, subgroups makes it
potentially easier to separate permissions on parts of the source code.
-
**Make it easier to manage people and control visibility.**
Give people
different
[
permissions
][]
depending on their group
[
membership
](
#membership
)
.
## Overview
A group can have many subgroups inside it, and at the same time a group can have
only 1 parent group. It resembles a directory behavior, like the one below:
```
group0
└── subgroup01a
└── subgroup01b
└── subgroup02
└── subgroup03
```
In a real world example, imagine maintaining a GNU/Linux distribution with the
first group being the name of the distro and subsequent groups split like:
```
Organization Group - GNU/Linux distro
└── Category Subgroup - Packages
└── project - Package01
└── project - Package02
└── Category Subgroup - Software
└── project - Core
└── project - CLI
└── project - Android app
└── project - iOS app
└── Category Subgroup - Infra tools
└── project - Ansible playbooks
```
Another example of GitLab as a company would be the following:
```
Organization Group - GitLab
└── Category Subroup - Marketing
└── project - Design
└── project - General
└── Category Subgroup - Software
└── project - GitLab CE
└── project - GitLab EE
└── project - Omnibus GitLab
└── project - GitLab Runner
└── project - GitLab Pages daemon
└── Category Subgroup - Infra tools
└── project - Chef cookbooks
└── Category Subgroup - Executive team
```
---
The maximum nested groups a group can have, including the first one in the
hierarchy, is 21.
Things like transferring or importing a project inside nested groups, work like
when performing these actions the traditional way with the
`group/project`
structure.
## Creating a subgroup
>**Notes:**
-
You need to be an Owner of a group in order to be able to create
a subgroup. For more information check the
[
permissions table
][
permissions
]
.
-
For a list of words that are not allowed to be used as group names see the
[
`namespace_validator.rb` file
][
reserved
]
under the
`RESERVED`
and
`WILDCARD_ROUTES`
lists.
To create a subgroup:
1.
In the group's dashboard go to the
**Subgroups**
page and click
**Create subgroup**
.
![Subgroups page](img/create_subgroup_button.png)
1.
Create a new group like you would normally do. Notice that the parent group
namespace is fixed under
**Group path**
. The visibility level can differ from
the parent group.
![Subgroups page](img/create_new_group.png)
1.
Click the
**Create group**
button and you will be taken to the new group's
dashboard page.
---
You can follow the same process to create any subsequent groups.
## Membership
When you add a member to a subgroup, they inherit the membership and permission
level from the parent group. This model allows access to nested groups if you
have membership in one of its parents.
You can tell if a member has inherited the permissions from a parent group by
looking at the group's
**Members**
page.
![
Group members page
](
img/group_members.png
)
From the image above, we can deduct the following things:
-
There are 5 members that have access to the group
**four**
-
Administrator is the Owner and member of all subgroups
-
User0 is a Reporter and has inherited their permissions from group
**one**
which is above the hierarchy of group
**four**
-
User1 is a Developer and has inherited their permissions from group
**one/two**
which is above the hierarchy of group
**four**
-
User2 is a Developer and has inherited their permissions from group
**one/two/three**
which is above the hierarchy of group
**four**
-
User3 is a Master of group
**four**
, there is no indication of a parent
group therefore they belong to group
**four**
The group permissions for a member can be changed only by Owners and only on
the
**Members**
page of the group the member was added.
## Mentioning subgroups
Mentioning groups (
`@group`
) in issues, commits and merge requests, would
mention all members of that group. Now with subgroups, there is a more granular
support if you want to split your group's structure. Mentioning works as before
and you can choose the group of people to be summoned.
![
Mentioning subgroups
](
img/mention_subgroups.png
)
## Limitations
Here's a list of what you can't do with subgroups:
-
[
GitLab Pages
](
../../project/pages/index.md
)
are not currently working for
projects hosted under a subgroup. That means that only projects hosted under
the first parent group will work.
-
Group level labels don't work in subgroups / sub projects
-
It is not possible to share a project with a group that's an ancestor of
the group the project is in. That means you can only share as you walk down
the hierarchy. For example,
`group/subgroup01/project`
**cannot**
be shared
with
`group`
, but can be shared with
`group/subgroup02`
or
`group/subgroup01/subgroup03`
.
[
ce-2772
]:
https://gitlab.com/gitlab-org/gitlab-ce/issues/2772
[
permissions
]:
../../permissions.md#group
[
reserved
]:
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/validators/namespace_validator.rb
doc/user/permissions.md
浏览文件 @
bb99fc25
...
...
@@ -81,6 +81,7 @@ group.
|-------------------------|-------|----------|-----------|--------|-------|
| Browse group | ✓ | ✓ | ✓ | ✓ | ✓ |
| Edit group | | | | | ✓ |
| Create subgroup | | | | | ✓ |
| Create project in group | | | | ✓ | ✓ |
| Manage group members | | | | | ✓ |
| Remove group | | | | | ✓ |
...
...
doc/workflow/README.md
浏览文件 @
bb99fc25
...
...
@@ -40,3 +40,4 @@
-
[
Importing from SVN, GitHub, Bitbucket, etc
](
importing/README.md
)
-
[
Todos
](
todos.md
)
-
[
Snippets
](
../user/snippets.md
)
-
[
Nested groups
](
../user/group/subgroups/index.md
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录