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 ...@@ -4,6 +4,8 @@ class Admin::IntegrationsController < Admin::ApplicationController
include IntegrationsActions include IntegrationsActions
include ServicesHelper include ServicesHelper
before_action :not_found, unless: -> { instance_level_integrations? }
feature_category :integrations feature_category :integrations
private private
...@@ -12,10 +14,6 @@ class Admin::IntegrationsController < Admin::ApplicationController ...@@ -12,10 +14,6 @@ class Admin::IntegrationsController < Admin::ApplicationController
Service.find_or_initialize_non_project_specific_integration(name, instance: true) Service.find_or_initialize_non_project_specific_integration(name, instance: true)
end end
def integrations_enabled?
instance_level_integrations?
end
def scoped_edit_integration_path(integration) def scoped_edit_integration_path(integration)
edit_admin_application_settings_integration_path(integration) edit_admin_application_settings_integration_path(integration)
end end
......
...@@ -6,7 +6,6 @@ module IntegrationsActions ...@@ -6,7 +6,6 @@ module IntegrationsActions
included do included do
include ServiceParams include ServiceParams
before_action :not_found, unless: :integrations_enabled?
before_action :integration, only: [:edit, :update, :test] before_action :integration, only: [:edit, :update, :test]
end end
...@@ -51,10 +50,6 @@ module IntegrationsActions ...@@ -51,10 +50,6 @@ module IntegrationsActions
private private
def integrations_enabled?
false
end
def integration def integration
# Using instance variable `@service` still required as it's used in ServiceParams. # Using instance variable `@service` still required as it's used in ServiceParams.
# Should be removed once that is refactored to use `@integration`. # Should be removed once that is refactored to use `@integration`.
......
...@@ -25,10 +25,6 @@ module Groups ...@@ -25,10 +25,6 @@ module Groups
Service.find_or_initialize_non_project_specific_integration(name, group_id: group.id) Service.find_or_initialize_non_project_specific_integration(name, group_id: group.id)
end end
def integrations_enabled?
Feature.enabled?(:group_level_integrations, group, default_enabled: true)
end
def scoped_edit_integration_path(integration) def scoped_edit_integration_path(integration)
edit_group_settings_integration_path(group, integration) edit_group_settings_integration_path(group, integration)
end end
......
...@@ -122,10 +122,6 @@ module ServicesHelper ...@@ -122,10 +122,6 @@ module ServicesHelper
false false
end end
def group_level_integrations?
@group.present? && Feature.enabled?(:group_level_integrations, @group, default_enabled: true)
end
def instance_level_integrations? def instance_level_integrations?
!Gitlab.com? !Gitlab.com?
end end
......
...@@ -7,7 +7,7 @@ module Admin ...@@ -7,7 +7,7 @@ module Admin
def propagate def propagate
if integration.instance? if integration.instance?
update_inherited_integrations 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 create_integration_for_projects_without_integration
else else
update_inherited_descendant_integrations update_inherited_descendant_integrations
......
...@@ -34,7 +34,7 @@ module Groups ...@@ -34,7 +34,7 @@ module Groups
if @group.save if @group.save
@group.add_owner(current_user) @group.add_owner(current_user)
@group.create_namespace_settings @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
end end
......
...@@ -159,7 +159,6 @@ ...@@ -159,7 +159,6 @@
%span %span
= _('General') = _('General')
- if group_level_integrations?
= nav_link(controller: :integrations) do = nav_link(controller: :integrations) do
= link_to group_settings_integrations_path(@group), title: _('Integrations') do = link_to group_settings_integrations_path(@group), title: _('Integrations') do
%span %span
......
---
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 ...@@ -24,16 +24,6 @@ RSpec.describe Groups::Settings::IntegrationsController do
group.add_owner(user) group.add_owner(user)
end 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 it 'successfully displays the template' do
get :index, params: { group_id: group } get :index, params: { group_id: group }
...@@ -57,16 +47,6 @@ RSpec.describe Groups::Settings::IntegrationsController do ...@@ -57,16 +47,6 @@ RSpec.describe Groups::Settings::IntegrationsController do
group.add_owner(user) group.add_owner(user)
end 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| Service.available_services_names(include_project_specific: false).each do |integration_name|
context "#{integration_name}" do context "#{integration_name}" do
it 'successfully displays the template' do it 'successfully displays the template' do
......
...@@ -28,38 +28,6 @@ RSpec.describe ServicesHelper do ...@@ -28,38 +28,6 @@ RSpec.describe ServicesHelper do
end end
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 describe '#scoped_reset_integration_path' do
let(:integration) { build_stubbed(:jira_service) } let(:integration) { build_stubbed(:jira_service) }
let(:group) { nil } 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