Commit 476accf1 authored by Nikola Milojevic's avatar Nikola Milojevic

Merge branch '338694-enable-create_vulnerabilities_via_api-globally' into 'master'

[Feature flag] Enable create_vulnerabilities_via_api by default

See merge request gitlab-org/gitlab!72204
parents d2eb22de 1a635aa3
...@@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/338694 ...@@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/338694
milestone: '14.3' milestone: '14.3'
type: development type: development
group: group::threat insights group: group::threat insights
default_enabled: false default_enabled: true
...@@ -73,7 +73,7 @@ module Mutations ...@@ -73,7 +73,7 @@ module Mutations
def resolve(**attributes) def resolve(**attributes)
project = authorized_find!(id: attributes.fetch(:project)) project = authorized_find!(id: attributes.fetch(:project))
raise Gitlab::Graphql::Errors::ResourceNotAvailable, 'Feature disabled' unless Feature.enabled?(:create_vulnerabilities_via_api, project) raise Gitlab::Graphql::Errors::ResourceNotAvailable, 'Feature disabled' unless Feature.enabled?(:create_vulnerabilities_via_api, project, default_enabled: :yaml)
params = build_vulnerability_params(attributes) params = build_vulnerability_params(attributes)
......
...@@ -17,7 +17,7 @@ module Vulnerabilities ...@@ -17,7 +17,7 @@ module Vulnerabilities
end end
def execute def execute
unless Feature.enabled?(:create_vulnerabilities_via_api, @project) unless Feature.enabled?(:create_vulnerabilities_via_api, @project, default_enabled: :yaml)
return ServiceResponse.error(message: "create_vulnerabilities_via_api feature flag is not enabled for this project") return ServiceResponse.error(message: "create_vulnerabilities_via_api feature flag is not enabled for this project")
end end
......
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