Commit 1a1e79e3 authored by Tan Le's avatar Tan Le Committed by Mike Jang

Add doc for MR approvals scoping

This feature allows administrator to scope MR approvals settings to
compliance-labeled projects.
parent 5b81f9dc
...@@ -34,3 +34,37 @@ Merge request approval rules that can be set at an instance level are: ...@@ -34,3 +34,37 @@ Merge request approval rules that can be set at an instance level are:
- **Prevent users from modifying merge request approvers list**. Prevents project - **Prevent users from modifying merge request approvers list**. Prevents project
maintainers from allowing users to modify the approvers list in project settings maintainers from allowing users to modify the approvers list in project settings
or in individual merge requests. or in individual merge requests.
## Scope rules to compliance-labeled projects
> Introduced in [GitLab Premium](https://gitlab.com/groups/gitlab-org/-/epics/3432) 13.1.
Merge request approval rules can be further scoped to specific compliance frameworks.
When the compliance framework label is selected and the project is assigned the compliance
label, the instance-level MR approval settings will take effect and
[project-level settings](../project/merge_requests/merge_request_approvals.md#adding--editing-a-default-approval-rule)
is locked for modification.
When the compliance framework label is not selected or the project is not assigned the
compliance label, the project-level MR approval settings will take effect and the users with
Maintainer role and above can modify these.
| Instance-level | Project-level |
| -------------- | ------------- |
| ![Scope MR approval settings to compliance frameworks](img/scope_mr_approval_settings_v13_1.png) | ![MR approval settings on compliance projects](img/mr_approval_settings_compliance_project_v13_1.png) |
### Enabling the feature
This feature comes with two feature flags which are disabled by default.
- The configuration in Admin area is controlled via `admin_merge_request_approval_settings`
- The application of these rules is controlled via `project_merge_request_approval_settings`
These feature flags can be managed by feature flag [API endpoint](../../api/features.md#set-or-create-a-feature) or
by [GitLab administrators with access to the GitLab Rails console](../../administration/feature_flags.md) with the following commands:
```ruby
Feature.enable(:admin_merge_request_approval_settings)
Feature.enable(:project_merge_request_approval_settings)
```
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment