Commit 4b4c5c5d authored by Mark Florian's avatar Mark Florian Committed by Mike Greiling

Add dependency_list_vulnerabilities feature flag

See [Add Dependency Scanning information to the Dependency List][1] for
details.

[1]: https://gitlab.com/gitlab-org/gitlab-ee/issues/10077.
parent 8964ddb3
......@@ -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