Commit 23d9dfa0 authored by Brandon Labuschagne's avatar Brandon Labuschagne

Merge branch '238575-remove-group-level-integrations-feature-flag' into 'master'

Remove group_level_integrations feature flag

See merge request gitlab-org/gitlab!44909
parents daf1b272 2be31f21
......@@ -4,6 +4,8 @@ class Admin::IntegrationsController < Admin::ApplicationController
include IntegrationsActions
include ServicesHelper
before_action :not_found, unless: -> { instance_level_integrations? }
feature_category :integrations
private
......@@ -12,10 +14,6 @@ class Admin::IntegrationsController < Admin::ApplicationController
Service.find_or_initialize_non_project_specific_integration(name, instance: true)
end
def integrations_enabled?
instance_level_integrations?
end
def scoped_edit_integration_path(integration)
edit_admin_application_settings_integration_path(integration)
end
......
......@@ -6,7 +6,6 @@ module IntegrationsActions
included do
include ServiceParams
before_action :not_found, unless: :integrations_enabled?
before_action :integration, only: [:edit, :update, :test]
end
......@@ -51,10 +50,6 @@ module IntegrationsActions
private
def integrations_enabled?
false
end
def integration
# Using instance variable `@service` still required as it's used in ServiceParams.
# Should be removed once that is refactored to use `@integration`.
......
......@@ -25,10 +25,6 @@ module Groups
Service.find_or_initialize_non_project_specific_integration(name, group_id: group.id)
end
def integrations_enabled?
Feature.enabled?(:group_level_integrations, group, default_enabled: true)
end
def scoped_edit_integration_path(integration)
edit_group_settings_integration_path(group, integration)
end
......
......@@ -122,10 +122,6 @@ module ServicesHelper
false
end
def group_level_integrations?
@group.present? && Feature.enabled?(:group_level_integrations, @group, default_enabled: true)
end
def instance_level_integrations?
!Gitlab.com?
end
......
......@@ -7,7 +7,7 @@ module Admin
def propagate
if integration.instance?
update_inherited_integrations
create_integration_for_groups_without_integration if Feature.enabled?(:group_level_integrations, default_enabled: true)
create_integration_for_groups_without_integration
create_integration_for_projects_without_integration
else
update_inherited_descendant_integrations
......
......@@ -34,7 +34,7 @@ module Groups
if @group.save
@group.add_owner(current_user)
@group.create_namespace_settings
Service.create_from_active_default_integrations(@group, :group_id) if Feature.enabled?(:group_level_integrations, default_enabled: true)
Service.create_from_active_default_integrations(@group, :group_id)
end
end
......
......@@ -159,11 +159,10 @@
%span
= _('General')
- if group_level_integrations?
= nav_link(controller: :integrations) do
= link_to group_settings_integrations_path(@group), title: _('Integrations') do
%span
= _('Integrations')
= nav_link(controller: :integrations) do
= link_to group_settings_integrations_path(@group), title: _('Integrations') do
%span
= _('Integrations')
= nav_link(path: 'groups#projects') do
= link_to projects_group_path(@group), title: _('Projects') do
......
---
name: group_level_integrations
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/27557
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/238575
milestone: '12.10'
type: development
group: group::ecosystem
default_enabled: true
......@@ -24,16 +24,6 @@ RSpec.describe Groups::Settings::IntegrationsController do
group.add_owner(user)
end
context 'when group_level_integrations not enabled' do
it 'returns not_found' do
stub_feature_flags(group_level_integrations: false)
get :index, params: { group_id: group }
expect(response).to have_gitlab_http_status(:not_found)
end
end
it 'successfully displays the template' do
get :index, params: { group_id: group }
......@@ -57,16 +47,6 @@ RSpec.describe Groups::Settings::IntegrationsController do
group.add_owner(user)
end
context 'when group_level_integrations not enabled' do
it 'returns not_found' do
stub_feature_flags(group_level_integrations: false)
get :edit, params: { group_id: group, id: Service.available_services_names(include_project_specific: false).sample }
expect(response).to have_gitlab_http_status(:not_found)
end
end
Service.available_services_names(include_project_specific: false).each do |integration_name|
context "#{integration_name}" do
it 'successfully displays the template' do
......
......@@ -28,38 +28,6 @@ RSpec.describe ServicesHelper do
end
end
describe '#group_level_integrations?' do
subject { helper.group_level_integrations? }
context 'when no group is present' do
it { is_expected.to eq(false) }
end
context 'when group is present' do
let(:group) { build_stubbed(:group) }
before do
assign(:group, group)
end
context 'when `group_level_integrations` is not enabled' do
it 'returns false' do
stub_feature_flags(group_level_integrations: false)
is_expected.to eq(false)
end
end
context 'when `group_level_integrations` is enabled for the group' do
it 'returns true' do
stub_feature_flags(group_level_integrations: group)
is_expected.to eq(true)
end
end
end
end
describe '#scoped_reset_integration_path' do
let(:integration) { build_stubbed(:jira_service) }
let(:group) { nil }
......
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