Commit 0883c4f4 authored by Tetiana Chupryna's avatar Tetiana Chupryna Committed by Bob Van Landuyt

Add license_scanning feature

license_management feature is deprecated,
it's support will be dropped in 13.0
parent 737d8993
......@@ -118,6 +118,7 @@ class License < ApplicationRecord
insights
issuable_health_status
license_management
license_scanning
personal_access_token_expiration_policy
pod_logs
prometheus_alerts
......
......@@ -92,8 +92,8 @@ module EE
end
with_scope :subject
condition(:license_management_enabled) do
@subject.feature_available?(:license_management)
condition(:license_scanning_enabled) do
@subject.feature_available?(:license_scanning) || @subject.feature_available?(:license_management)
end
with_scope :subject
......@@ -200,7 +200,7 @@ module EE
rule { dependency_scanning_enabled & can?(:download_code) }.enable :read_dependencies
rule { license_management_enabled & can?(:download_code) }.enable :read_licenses
rule { license_scanning_enabled & can?(:download_code) }.enable :read_licenses
rule { can?(:read_licenses) }.enable :read_software_license_policy
......@@ -228,7 +228,7 @@ module EE
enable :modify_merge_request_committer_setting
end
rule { license_management_enabled & can?(:maintainer_access) }.enable :admin_software_license_policy
rule { license_scanning_enabled & can?(:maintainer_access) }.enable :admin_software_license_policy
rule { pod_logs_enabled & can?(:maintainer_access) }.enable :read_pod_logs
rule { prometheus_alerts_enabled & can?(:maintainer_access) }.enable :read_prometheus_alerts
......
......@@ -27,7 +27,7 @@ license_scanning:
refs:
- branches
variables:
- $GITLAB_FEATURES =~ /\blicense_management\b/
- $GITLAB_FEATURES =~ /\blicense_scanning\b/
except:
variables:
- $LICENSE_MANAGEMENT_DISABLED
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