Commit 68cf6b34 authored by Jonathan Schafer's avatar Jonathan Schafer

Add feature flag check to projects route

parent d110fa5f
...@@ -86,6 +86,7 @@ module API ...@@ -86,6 +86,7 @@ module API
use :pagination use :pagination
end end
get ':id/vulnerabilities' do get ':id/vulnerabilities' do
break not_found! unless Feature.enabled?(:first_class_vulnerabilities, user_project)
authorize! :read_vulnerability, user_project authorize! :read_vulnerability, user_project
vulnerabilities = paginate( vulnerabilities = paginate(
...@@ -102,6 +103,7 @@ module API ...@@ -102,6 +103,7 @@ module API
requires :finding_id, type: Integer, desc: 'The id of confirmed vulnerability finding' requires :finding_id, type: Integer, desc: 'The id of confirmed vulnerability finding'
end end
post ':id/vulnerabilities' do post ':id/vulnerabilities' do
break not_found! unless Feature.enabled?(:first_class_vulnerabilities, user_project)
authorize! :create_vulnerability, user_project authorize! :create_vulnerability, user_project
vulnerability = ::Vulnerabilities::CreateService.new( vulnerability = ::Vulnerabilities::CreateService.new(
......
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