Commit 52b02dcb authored by Mike Greiling's avatar Mike Greiling

Merge branch '10077-add-dependency-scanning-to-dl-feature-flag-ee' into 'master'

Add dependency_list_vulnerabilities feature flag

See merge request gitlab-org/gitlab-ee!14359
parents 8964ddb3 4b4c5c5d
...@@ -32,6 +32,11 @@ export default { ...@@ -32,6 +32,11 @@ export default {
type: String, type: String,
required: true, required: true,
}, },
dependencyListVulnerabilities: {
type: Boolean,
required: false,
default: false,
},
}, },
data() { data() {
return { return {
......
...@@ -5,6 +5,7 @@ import createStore from './store'; ...@@ -5,6 +5,7 @@ import createStore from './store';
export default () => { export default () => {
const el = document.querySelector('#js-dependencies-app'); const el = document.querySelector('#js-dependencies-app');
const { endpoint, emptyStateSvgPath, documentationPath } = el.dataset; const { endpoint, emptyStateSvgPath, documentationPath } = el.dataset;
const { dependencyListVulnerabilities = false } = gon.features || {};
const store = createStore(); const store = createStore();
...@@ -20,6 +21,7 @@ export default () => { ...@@ -20,6 +21,7 @@ export default () => {
endpoint, endpoint,
emptyStateSvgPath, emptyStateSvgPath,
documentationPath, documentationPath,
dependencyListVulnerabilities,
}, },
}); });
}, },
......
...@@ -4,6 +4,10 @@ module Projects ...@@ -4,6 +4,10 @@ module Projects
class DependenciesController < Projects::ApplicationController class DependenciesController < Projects::ApplicationController
before_action :check_feature_enabled! before_action :check_feature_enabled!
before_action do
push_frontend_feature_flag(:dependency_list_vulnerabilities)
end
def check_feature_enabled! def check_feature_enabled!
render_404 unless project.feature_available?(:dependency_list) render_404 unless project.feature_available?(:dependency_list)
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