diff --git a/ee/app/assets/javascripts/security_orchestration/components/policies/list_component_scope.vue b/ee/app/assets/javascripts/security_orchestration/components/policies/list_component_scope.vue index 91a07ad32d08a4906a17fe1cfec0b31a09245d2a..2042b9818324c226d21bcf9f38e939de3be04a09 100644 --- a/ee/app/assets/javascripts/security_orchestration/components/policies/list_component_scope.vue +++ b/ee/app/assets/javascripts/security_orchestration/components/policies/list_component_scope.vue @@ -3,7 +3,6 @@ import ComplianceFrameworksToggleList from 'ee/security_orchestration/components import ProjectsToggleList from 'ee/security_orchestration/components/policy_drawer/projects_toggle_list.vue'; import GroupsToggleList from 'ee/security_orchestration/components/policy_drawer/groups_toggle_list.vue'; import { s__ } from '~/locale'; -import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import ScopeDefaultLabel from 'ee/security_orchestration/components/scope_default_label.vue'; import { policyScopeHasComplianceFrameworks, @@ -31,7 +30,6 @@ export default { GroupsToggleList, ProjectsToggleList, }, - mixins: [glFeatureFlagMixin()], inject: ['namespaceType'], props: { policyScope: { @@ -46,9 +44,6 @@ export default { }, }, computed: { - showGroupScope() { - return this.glFeatures.policyGroupScope || this.glFeatures.policyGroupScopeProject; - }, isGroup() { return isGroup(this.namespaceType); }, @@ -88,7 +83,7 @@ export default { return this.policyHasProjects && this.showScopeSection; }, showGroups() { - return policyScopeHasGroups(this.policyScope) && this.showScopeSection && this.showGroupScope; + return policyScopeHasGroups(this.policyScope) && this.showScopeSection; }, showDefaultLabel() { return this.isDefaultMode && this.showScopeSection; diff --git a/ee/app/assets/javascripts/security_orchestration/components/policy_drawer/scope_info_row.vue b/ee/app/assets/javascripts/security_orchestration/components/policy_drawer/scope_info_row.vue index 2073e2c23e52868fc3fa4f648d7e7e30bd9a7af4..58ae66cb728c7ee20cb7dedeb82cab79bd8240cf 100644 --- a/ee/app/assets/javascripts/security_orchestration/components/policy_drawer/scope_info_row.vue +++ b/ee/app/assets/javascripts/security_orchestration/components/policy_drawer/scope_info_row.vue @@ -4,7 +4,6 @@ import { SCOPE_TITLE, } from 'ee/security_orchestration/components/policy_drawer/constants'; import ScopeDefaultLabel from 'ee/security_orchestration/components/scope_default_label.vue'; -import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import { policyScopeHasComplianceFrameworks, policyScopeHasExcludingProjects, @@ -38,7 +37,6 @@ export default { scopeTitle: SCOPE_TITLE, defaultProjectText: DEFAULT_PROJECT_TEXT, }, - mixins: [glFeatureFlagMixin()], inject: ['namespaceType', 'namespacePath'], apollo: { linkedSppItems: { @@ -74,9 +72,6 @@ export default { }; }, computed: { - showGroupScope() { - return this.glFeatures.policyGroupScope || this.glFeatures.policyGroupScopeProject; - }, isGroup() { return isGroup(this.namespaceType); }, @@ -93,7 +88,7 @@ export default { return policyScopeHasIncludingProjects(this.policyScope); }, policyScopeHasGroups() { - return policyScopeHasGroups(this.policyScope) && this.showGroupScope && this.showScopeSection; + return policyScopeHasGroups(this.policyScope) && this.showScopeSection; }, policyScopeHasExcludingProjects() { return policyScopeHasExcludingProjects(this.policyScope); diff --git a/ee/app/assets/javascripts/security_orchestration/components/policy_editor/scope/constants.js b/ee/app/assets/javascripts/security_orchestration/components/policy_editor/scope/constants.js index 14248895c1e89e5bc0789e73c969d6b16fb028b2..c24fb7c4029afc92d9f456f0cdd2eca867dc1d64 100644 --- a/ee/app/assets/javascripts/security_orchestration/components/policy_editor/scope/constants.js +++ b/ee/app/assets/javascripts/security_orchestration/components/policy_editor/scope/constants.js @@ -5,13 +5,11 @@ export const ALL_PROJECTS_IN_GROUP = 'all_projects_in_group'; export const SPECIFIC_PROJECTS = 'specific_projects'; export const ALL_PROJECTS_IN_LINKED_GROUPS = 'all_projects_in_linked_groups'; -export const PROJECT_TO_GROUP_SCOPE_TYPE_TEXTS = { - [ALL_PROJECTS_IN_LINKED_GROUPS]: s__('SecurityOrchestration|all projects in the linked groups'), -}; export const PROJECT_SCOPE_TYPE_TEXTS = { [PROJECTS_WITH_FRAMEWORK]: s__('SecurityOrchestration|projects with compliance frameworks'), [ALL_PROJECTS_IN_GROUP]: s__('SecurityOrchestration|all projects in this group'), [SPECIFIC_PROJECTS]: s__('SecurityOrchestration|specific projects'), + [ALL_PROJECTS_IN_LINKED_GROUPS]: s__('SecurityOrchestration|all projects in the linked groups'), }; const mapToListBoxItems = (textMap) => @@ -20,9 +18,6 @@ const mapToListBoxItems = (textMap) => text, })); -export const PROJECT_TO_GROUP_SCOPE_TYPE_LISTBOX_ITEMS = mapToListBoxItems( - PROJECT_TO_GROUP_SCOPE_TYPE_TEXTS, -); export const PROJECT_SCOPE_TYPE_LISTBOX_ITEMS = mapToListBoxItems(PROJECT_SCOPE_TYPE_TEXTS); export const WITHOUT_EXCEPTIONS = 'without_exceptions'; diff --git a/ee/app/assets/javascripts/security_orchestration/components/policy_editor/scope/scope_section.vue b/ee/app/assets/javascripts/security_orchestration/components/policy_editor/scope/scope_section.vue index 2e4530d07174ca70633d2132694385b39d701d7d..6892fa38cf5891598e2b0ad0a945ba6f62f679cf 100644 --- a/ee/app/assets/javascripts/security_orchestration/components/policy_editor/scope/scope_section.vue +++ b/ee/app/assets/javascripts/security_orchestration/components/policy_editor/scope/scope_section.vue @@ -15,7 +15,6 @@ import { convertToGraphQLId } from '~/graphql_shared/utils'; import { TYPENAME_PROJECT } from '~/graphql_shared/constants'; import { isProject, isGroup } from 'ee/security_orchestration/components/utils'; import PolicyPopover from 'ee/security_orchestration/components/policy_popover.vue'; -import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import getSppLinkedProjectsGroups from 'ee/security_orchestration/graphql/queries/get_spp_linked_projects_groups.graphql'; import LoaderWithMessage from '../../loader_with_message.vue'; import ComplianceFrameworkDropdown from './compliance_framework_dropdown.vue'; @@ -25,7 +24,6 @@ import ScopeProjectSelector from './scope_project_selector.vue'; import { PROJECTS_WITH_FRAMEWORK, PROJECT_SCOPE_TYPE_LISTBOX_ITEMS, - PROJECT_TO_GROUP_SCOPE_TYPE_LISTBOX_ITEMS, PROJECT_SCOPE_TYPE_TEXTS, EXCEPTION_TYPE_LISTBOX_ITEMS, WITHOUT_EXCEPTIONS, @@ -44,7 +42,6 @@ export default { COMPLIANCE_FRAMEWORK_PATH: helpPagePath('user/group/compliance_frameworks.md'), SCOPE_HELP_PATH: helpPagePath('user/application_security/policies/index.md'), PROJECT_SCOPE_TYPE_LISTBOX_ITEMS, - PROJECT_TO_GROUP_SCOPE_TYPE_LISTBOX_ITEMS, EXCEPTION_TYPE_LISTBOX_ITEMS, i18n: { policyScopeLoadingText: s__('SecurityOrchestration|Fetching the scope information.'), @@ -127,7 +124,6 @@ export default { }, }, }, - mixins: [glFeatureFlagMixin()], inject: [ 'assignedPolicyProject', 'existingPolicy', @@ -183,17 +179,8 @@ export default { assignedPolicyProjectPath() { return this.isGroupLevel ? this.assignedPolicyProject?.fullPath || '' : this.namespacePath; }, - showPolicyGroupScope() { - return ( - this.glFeatures.policyGroupScope || - (this.glFeatures.policyGroupScopeProject && this.hasMultipleProjectsLinked) - ); - }, scopeItems() { - return [ - ...PROJECT_SCOPE_TYPE_LISTBOX_ITEMS, - ...(this.showPolicyGroupScope ? PROJECT_TO_GROUP_SCOPE_TYPE_LISTBOX_ITEMS : []), - ]; + return PROJECT_SCOPE_TYPE_LISTBOX_ITEMS; }, hasGroups() { return Boolean(this.policyScope.groups?.including); @@ -410,7 +397,7 @@ export default { }" fluid-width data-testid="project-scope-type" - :items="scopeItems" + :items="$options.PROJECT_SCOPE_TYPE_LISTBOX_ITEMS" :selected="selectedProjectScopeType" :toggle-text="selectedProjectScopeText" :disabled="disableScopeSelector" @@ -442,7 +429,7 @@ export default { <template #projectSelector> <scope-group-selector - v-if="showScopeGroupSelector && showPolicyGroupScope" + v-if="showScopeGroupSelector" class="gl-basis-full" :is-dirty="isFormDirty" :exception-type="selectedExceptionType" diff --git a/ee/app/controllers/groups/security/policies_controller.rb b/ee/app/controllers/groups/security/policies_controller.rb index 3f0ae05af58b70fd725e6b489ebb374c28d1a7f3..94166398f2ed40081c81824ec0ba0b646352ee26 100644 --- a/ee/app/controllers/groups/security/policies_controller.rb +++ b/ee/app/controllers/groups/security/policies_controller.rb @@ -12,7 +12,6 @@ class PoliciesController < Groups::ApplicationController before_action do push_frontend_feature_flag(:vulnerability_management_policy_type_group, group) push_frontend_feature_flag(:scan_result_policy_block_group_branch_modification, group) - push_frontend_feature_flag(:policy_group_scope, group) push_frontend_feature_flag(:scan_execution_policy_action_limit_group, group) end diff --git a/ee/app/controllers/projects/security/policies_controller.rb b/ee/app/controllers/projects/security/policies_controller.rb index 17c9c0c6889eba386b1ce403d85e77b0bbb840ac..f854013b5961465ab0602bdd0c414c9f38e15349 100644 --- a/ee/app/controllers/projects/security/policies_controller.rb +++ b/ee/app/controllers/projects/security/policies_controller.rb @@ -12,7 +12,6 @@ class PoliciesController < Projects::ApplicationController before_action do push_frontend_feature_flag(:vulnerability_management_policy_type, project) - push_frontend_feature_flag(:policy_group_scope_project, project) push_frontend_feature_flag(:scan_execution_policy_action_limit, project) end diff --git a/ee/config/feature_flags/development/policy_group_scope.yml b/ee/config/feature_flags/development/policy_group_scope.yml deleted file mode 100644 index ba0b3d00e9619c22a95e6a21dcf3307d4ad8b169..0000000000000000000000000000000000000000 --- a/ee/config/feature_flags/development/policy_group_scope.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: policy_group_scope -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/issues/470059 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/470052 -milestone: '17.4' -type: development -group: group::security policies -default_enabled: true diff --git a/ee/config/feature_flags/development/policy_group_scope_project.yml b/ee/config/feature_flags/development/policy_group_scope_project.yml deleted file mode 100644 index c7aea14014510ca6e391e6a0ddf26ddd3a996a9c..0000000000000000000000000000000000000000 --- a/ee/config/feature_flags/development/policy_group_scope_project.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: policy_group_scope_project -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/issues/488378 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/488379 -milestone: '17.4' -type: development -group: group::security policies -default_enabled: true diff --git a/ee/spec/frontend/security_orchestration/components/policies/list_component_scope_spec.js b/ee/spec/frontend/security_orchestration/components/policies/list_component_scope_spec.js index d2ed3f3d3fdc1c69be991cf74909cdd50d784429..802b8bcdb313417c873c47b157b8cbe6db50c028 100644 --- a/ee/spec/frontend/security_orchestration/components/policies/list_component_scope_spec.js +++ b/ee/spec/frontend/security_orchestration/components/policies/list_component_scope_spec.js @@ -178,20 +178,6 @@ describe('ListComponentScope', () => { describe('group scope', () => { const items = [{ id: 1 }, { id: 2 }]; - it('does not render group scope when ff is off', () => { - createComponent({ - propsData: { - policyScope: { - includingGroups: { - nodes: items, - }, - }, - }, - }); - - expect(findGroupsToggleList().exists()).toBe(false); - }); - it('renders group scope when groups are provided', () => { createComponent({ propsData: { @@ -201,11 +187,6 @@ describe('ListComponentScope', () => { }, }, }, - provide: { - glFeatures: { - policyGroupScope: true, - }, - }, }); expect(findGroupsToggleList().exists()).toBe(true); @@ -227,11 +208,6 @@ describe('ListComponentScope', () => { }, }, }, - provide: { - glFeatures: { - policyGroupScope: true, - }, - }, }); expect(findGroupsToggleList().exists()).toBe(true); @@ -251,11 +227,6 @@ describe('ListComponentScope', () => { }, }, }, - provide: { - glFeatures: { - policyGroupScope: true, - }, - }, }); expect(findGroupsToggleList().exists()).toBe(false); @@ -417,9 +388,6 @@ describe('ListComponentScope', () => { }, provide: { namespaceType: NAMESPACE_TYPES.PROJECT, - glFeatures: { - policyGroupScopeProject: true, - }, }, }); diff --git a/ee/spec/frontend/security_orchestration/components/policy_drawer/scope_info_row_spec.js b/ee/spec/frontend/security_orchestration/components/policy_drawer/scope_info_row_spec.js index 6d74409d5fa61c1fbb2dd13695857400fe41e206..e0365358475657e99f61b22dba0ffca11b1a2c98 100644 --- a/ee/spec/frontend/security_orchestration/components/policy_drawer/scope_info_row_spec.js +++ b/ee/spec/frontend/security_orchestration/components/policy_drawer/scope_info_row_spec.js @@ -132,20 +132,6 @@ describe('ScopeInfoRow', () => { }); describe('group scope', () => { - it('does not render group scope when ff is off', () => { - createComponent({ - propsData: { - policyScope: { - includingGroups: { - nodes: items, - }, - }, - }, - }); - - expect(findGroupsToggleList().exists()).toBe(false); - }); - it('renders group scope when groups are provided', () => { createComponent({ propsData: { @@ -155,11 +141,6 @@ describe('ScopeInfoRow', () => { }, }, }, - provide: { - glFeatures: { - policyGroupScope: true, - }, - }, }); expect(findGroupsToggleList().exists()).toBe(true); @@ -180,11 +161,6 @@ describe('ScopeInfoRow', () => { }, }, }, - provide: { - glFeatures: { - policyGroupScope: true, - }, - }, }); expect(findGroupsToggleList().exists()).toBe(true); @@ -204,11 +180,6 @@ describe('ScopeInfoRow', () => { }, }, }, - provide: { - glFeatures: { - policyGroupScope: true, - }, - }, }); expect(findGroupsToggleList().exists()).toBe(false); @@ -268,9 +239,6 @@ describe('ScopeInfoRow', () => { }, provide: { namespaceType: NAMESPACE_TYPES.PROJECT, - glFeatures: { - policyGroupScopeProject: true, - }, }, }); @@ -301,9 +269,6 @@ describe('ScopeInfoRow', () => { }, provide: { namespaceType: NAMESPACE_TYPES.PROJECT, - glFeatures: { - policyGroupScopeProject: true, - }, }, }); diff --git a/ee/spec/frontend/security_orchestration/components/policy_editor/scope/scope_section_spec.js b/ee/spec/frontend/security_orchestration/components/policy_editor/scope/scope_section_spec.js index bd65c8d3425e75a075ad6c9d133dcd16d52b453e..1b2674b3ad316dc72f9c49125b21f35818e1128a 100644 --- a/ee/spec/frontend/security_orchestration/components/policy_editor/scope/scope_section_spec.js +++ b/ee/spec/frontend/security_orchestration/components/policy_editor/scope/scope_section_spec.js @@ -19,7 +19,6 @@ import { EXCEPT_PROJECTS, WITHOUT_EXCEPTIONS, PROJECT_SCOPE_TYPE_LISTBOX_ITEMS, - PROJECT_TO_GROUP_SCOPE_TYPE_LISTBOX_ITEMS, ALL_PROJECTS_IN_LINKED_GROUPS, } from 'ee/security_orchestration/components/policy_editor/scope/constants'; import { @@ -331,21 +330,8 @@ describe('PolicyScope', () => { }); describe('project level with policy group scope', () => { - it('does not renders group selector when SPP has linked items but flag is disabled', async () => { - await createComponentForSPP(); - - await findProjectScopeTypeDropdown().vm.$emit('select', ALL_PROJECTS_IN_LINKED_GROUPS); - expect(findScopeGroupSelector().exists()).toBe(false); - }); - it('renders group selector when SPP has linked items', async () => { - await createComponentForSPP({ - provide: { - glFeatures: { - policyGroupScopeProject: true, - }, - }, - }); + await createComponentForSPP(); await findProjectScopeTypeDropdown().vm.$emit('select', ALL_PROJECTS_IN_LINKED_GROUPS); expect(findScopeGroupSelector().exists()).toBe(true); @@ -353,13 +339,7 @@ describe('PolicyScope', () => { }); it('selects policy group scope on project level for SPP', async () => { - await createComponentForSPP({ - provide: { - glFeatures: { - policyGroupScopeProject: true, - }, - }, - }); + await createComponentForSPP(); await findProjectScopeTypeDropdown().vm.$emit('select', ALL_PROJECTS_IN_LINKED_GROUPS); await findScopeGroupSelector().vm.$emit('changed', { @@ -375,13 +355,10 @@ describe('PolicyScope', () => { ]); }); - it('does not renders group selector when SPP has no linked items but flag is enabled', async () => { + it('does not render group selector when SPP has no linked items', async () => { createComponent({ provide: { namespaceType: NAMESPACE_TYPES.PROJECT, - glFeatures: { - policyGroupScopeProject: true, - }, }, }); @@ -660,20 +637,13 @@ describe('PolicyScope', () => { describe('policy group scope', () => { describe('initial selection', () => { beforeEach(() => { - createComponent({ - provide: { - glFeatures: { - policyGroupScope: true, - }, - }, - }); + createComponent(); }); it('has group scope type in scope dropdown', () => { - expect(findProjectScopeTypeDropdown().props('items')).toEqual([ - ...PROJECT_SCOPE_TYPE_LISTBOX_ITEMS, - ...PROJECT_TO_GROUP_SCOPE_TYPE_LISTBOX_ITEMS, - ]); + expect(findProjectScopeTypeDropdown().props('items')).toEqual( + PROJECT_SCOPE_TYPE_LISTBOX_ITEMS, + ); }); it('should select including groups', async () => { @@ -746,11 +716,6 @@ describe('PolicyScope', () => { }, }, }, - provide: { - glFeatures: { - policyGroupScope: true, - }, - }, }); expect(findScopeGroupSelector().exists()).toBe(true); @@ -766,11 +731,6 @@ describe('PolicyScope', () => { }, }, }, - provide: { - glFeatures: { - policyGroupScope: true, - }, - }, }); expect(findScopeGroupSelector().exists()).toBe(true); @@ -793,11 +753,6 @@ describe('PolicyScope', () => { }, }, }, - provide: { - glFeatures: { - policyGroupScope: true, - }, - }, }); expect(findScopeGroupSelector().exists()).toBe(true); @@ -823,11 +778,6 @@ describe('PolicyScope', () => { }, }, }, - provide: { - glFeatures: { - policyGroupScope: true, - }, - }, }); expect(findScopeGroupSelector().exists()).toBe(true); diff --git a/ee/spec/frontend_integration/security_orchestration/policies_list/policy_scope/linked_groups_spec.js b/ee/spec/frontend_integration/security_orchestration/policies_list/policy_scope/linked_groups_spec.js index ccb810d619069a63a6dbc915b05653c2584d52f7..8c150152ea58aa0f423a2415e7e79f9325273ba6 100644 --- a/ee/spec/frontend_integration/security_orchestration/policies_list/policy_scope/linked_groups_spec.js +++ b/ee/spec/frontend_integration/security_orchestration/policies_list/policy_scope/linked_groups_spec.js @@ -175,13 +175,7 @@ describe('Policies List policy scope', () => { `( 'scoped to itself when project is not SPP for $policyType', async ({ policyScopeRowIndex, selectedRow }) => { - createWrapper({ - provide: { - glFeatures: { - policyGroupScopeProject: true, - }, - }, - }); + createWrapper(); await waitForPromises(); expect(findAllListComponentScope().at(policyScopeRowIndex).text()).toBe('This project'); @@ -207,11 +201,6 @@ describe('Policies List policy scope', () => { namespaces: includingGroups, }), }, - provide: { - glFeatures: { - policyGroupScopeProject: true, - }, - }, }); await waitForPromises(); @@ -238,9 +227,6 @@ describe('Policies List policy scope', () => { createWrapper({ provide: { namespaceType: NAMESPACE_TYPES.GROUP, - glFeatures: { - policyGroupScope: true, - }, }, }); diff --git a/ee/spec/frontend_integration/security_orchestration/policy_editor/policy_scope/linked_groups_spec.js b/ee/spec/frontend_integration/security_orchestration/policy_editor/policy_scope/linked_groups_spec.js index 3f8533fe77f8088af14ffd85371f0ec0f1eb1e6f..c58d8645f6f7cf7bf0f7eb5b453f357c72f3ee12 100644 --- a/ee/spec/frontend_integration/security_orchestration/policy_editor/policy_scope/linked_groups_spec.js +++ b/ee/spec/frontend_integration/security_orchestration/policy_editor/policy_scope/linked_groups_spec.js @@ -37,7 +37,6 @@ describe('Policy Scope for linked groups', () => { existingPolicy: null, ...DEFAULT_PROVIDE, glFeatures: { - policyGroupScope: true, ...glFeatures, }, scanResultPolicyApprovers: {},