Commit 2a9b1833 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Merge branch 'kmann-master-patch-84342' into 'master'

Update denied license behavior if detected

See merge request gitlab-org/gitlab!37191
parents 6189b134 30f10a8c
......@@ -24,7 +24,9 @@ source and target branches, and shows the information right on the merge request
Denied licenses will be clearly visible with an `x` red icon next to them
as well as new licenses which need a decision from you. In addition, you can
[manually allow or deny](#policies)
licenses in your project's license compliance policy section.
licenses in your project's license compliance policy section. If GitLab detects a denied license
in a new commit, GitLab blocks any merge requests containing that commit and instructs the developer
to remove the license.
NOTE: **Note:**
If the license compliance report doesn't have anything to compare to, no information
......@@ -699,10 +701,16 @@ in your project's sidebar, and you'll see the licenses displayed, where:
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/22465) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 12.9.
The **Policies** tab allows you to see your project's software license policies
and the associated classifications for each.
Policies allow you to specify licenses that are `allowed` or `denied` in a project. If a `denied`
license is newly committed it will disallow a merge request and instruct the developer to remove it.
Note, the merge request will not be able to be merged until the `denied` license is removed.
You may add a [`License-Check` approval rule](#enabling-license-approvals-within-a-project),
which enables a designated approver that can approve and then merge a merge request with `denied` license.
Policies can be configured by maintainers of the project.
![Merge Request with denied licenses](img/denied_licenses_v13_3.png)
The **Policies** tab in the project's license compliance section displays your project's license
policies. Project maintainers can specify policies in this section.
![Edit Policy](img/policies_maintainer_edit_v13_2.png)
![Add Policy](img/policies_maintainer_add_v13_2.png)
......
......@@ -145,7 +145,7 @@ module EE
end
def has_denied_policies?
return false if ::Feature.disabled?(:license_compliance_denies_mr, project, default_enabled: false)
return false if ::Feature.disabled?(:license_compliance_denies_mr, project, default_enabled: true)
return false unless has_license_scanning_reports?
return false if has_approved_license_check?
......
---
title: Add docs about denied licenses and update feature flag
merge_request: 37191
author:
type: added
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