Commit e7b5b39b authored by Alexander Turinske's avatar Alexander Turinske Committed by Enrique Alcántara

Remove :cluster_vulnerabilities feature flag

- remove any reference to the :cluster_vulnerabilities
  feature flag

Changelog: removed
EE: true
parent 5a5c094d
...@@ -3,10 +3,6 @@ ...@@ -3,10 +3,6 @@
class Projects::ClusterAgentsController < Projects::ApplicationController class Projects::ClusterAgentsController < Projects::ApplicationController
before_action :authorize_can_read_cluster_agent! before_action :authorize_can_read_cluster_agent!
before_action do
push_frontend_feature_flag(:cluster_vulnerabilities, project, default_enabled: :yaml)
end
feature_category :kubernetes_management feature_category :kubernetes_management
def show def show
......
---
name: cluster_vulnerabilities
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/73321
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/343917
milestone: '14.5'
type: development
group: group::container security
default_enabled: true
...@@ -6,7 +6,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w ...@@ -6,7 +6,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
# Container vulnerability scanning **(ULTIMATE)** # Container vulnerability scanning **(ULTIMATE)**
> [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/6346) in GitLab 14.8 [with a flag](../../../administration/feature_flags.md) named `cluster_vulnerabilities`. Enabled by default. > [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/6346) in GitLab 14.8.
To view cluster vulnerabilities, you can view the [vulnerability report](../../application_security/vulnerabilities/index.md). To view cluster vulnerabilities, you can view the [vulnerability report](../../application_security/vulnerabilities/index.md).
You can also configure your agent so the vulnerabilities are displayed with other agent information in GitLab. You can also configure your agent so the vulnerabilities are displayed with other agent information in GitLab.
......
...@@ -17,9 +17,7 @@ export default { ...@@ -17,9 +17,7 @@ export default {
mixins: [glFeatureFlagMixin()], mixins: [glFeatureFlagMixin()],
computed: { computed: {
showSecurityTab() { showSecurityTab() {
return ( return this.glFeatures.kubernetesClusterVulnerabilities;
this.glFeatures.kubernetesClusterVulnerabilities && this.glFeatures.clusterVulnerabilities
);
}, },
}, },
}; };
......
import { GlTab } from '@gitlab/ui'; import { GlTab } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { nextTick } from 'vue';
import { stubComponent } from 'helpers/stub_component'; import { stubComponent } from 'helpers/stub_component';
import { extendedWrapper } from 'helpers/vue_test_utils_helper'; import { extendedWrapper } from 'helpers/vue_test_utils_helper';
import ClusterAgentShow from 'ee/clusters/agents/components/show.vue'; import ClusterAgentShow from 'ee/clusters/agents/components/show.vue';
...@@ -16,7 +15,7 @@ describe('ClusterAgentShow', () => { ...@@ -16,7 +15,7 @@ describe('ClusterAgentShow', () => {
template: `<div><slot name="ee-security-tab" clusterAgentId="${clusterAgentId}"></slot></div>`, template: `<div><slot name="ee-security-tab" clusterAgentId="${clusterAgentId}"></slot></div>`,
}); });
const createWrapper = ({ glFeatures = {} } = {}) => { const createWrapper = ({ glFeatures = { kubernetesClusterVulnerabilities: true } } = {}) => {
wrapper = extendedWrapper( wrapper = extendedWrapper(
shallowMount(ClusterAgentShow, { shallowMount(ClusterAgentShow, {
provide: { glFeatures }, provide: { glFeatures },
...@@ -34,27 +33,27 @@ describe('ClusterAgentShow', () => { ...@@ -34,27 +33,27 @@ describe('ClusterAgentShow', () => {
wrapper.destroy(); wrapper.destroy();
}); });
describe('tab behavior', () => { describe('when a user does have permission', () => {
it.each` beforeEach(() => {
title | glFeatures | tabStatus createWrapper();
${'does not display the tab when no glFeatures are available'} | ${{}} | ${false} });
${'does not display the tab when only the "clusterVulnerabilities" flag is true'} | ${{ clusterVulnerabilities: true }} | ${false}
${'does not display the tab when only the "kubernetesClusterVulnerabilities" flag is true'} | ${{ kubernetesClusterVulnerabilities: true }} | ${false} it('does not display the tab', () => {
${'does display the tab when both the "kubernetesClusterVulnerabilities" flag and "clusterVulnerabilities" flag are true'} | ${{ clusterVulnerabilities: true, kubernetesClusterVulnerabilities: true }} | ${true} expect(findTab().exists()).toBe(true);
`('$title', async ({ glFeatures, tabStatus }) => {
createWrapper({ glFeatures });
await nextTick();
expect(findTab().exists()).toBe(tabStatus);
}); });
});
describe('vulnerability report', () => { it('does display the cluster agent id', () => {
it('renders with cluster agent id', async () => {
createWrapper({
glFeatures: { clusterVulnerabilities: true, kubernetesClusterVulnerabilities: true },
});
await nextTick();
expect(findAgentVulnerabilityReport().props('clusterAgentId')).toBe(clusterAgentId); expect(findAgentVulnerabilityReport().props('clusterAgentId')).toBe(clusterAgentId);
}); });
}); });
describe('without access', () => {
beforeEach(() => {
createWrapper({ glFeatures: { kubernetesClusterVulnerabilities: false } });
});
it('when a user does not have permission', () => {
expect(findTab().exists()).toBe(false);
});
});
}); });
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