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