Commit e1a8eeb1 authored by Luke Duncalfe's avatar Luke Duncalfe

Merge branch '218252-remove-feature-flag' into 'master'

Enable instance-level integration overrides tab feature

See merge request gitlab-org/gitlab!67927
parents 3944a544 b8ab6f1e
......@@ -8,8 +8,6 @@ class Admin::IntegrationsController < Admin::ApplicationController
feature_category :integrations
def overrides
return render_404 unless instance_level_integration_overrides?
respond_to do |format|
format.json do
projects = Project.with_active_integration(integration.class).merge(::Integration.with_custom_settings)
......
......@@ -129,15 +129,11 @@ module IntegrationsHelper
[
{ key: 'edit', text: _('Settings'), href: scoped_edit_integration_path(integration) },
(
{ key: 'overrides', text: s_('Integrations|Projects using custom settings'), href: scoped_overrides_integration_path(integration) } if integration.instance_level? && instance_level_integration_overrides?
{ key: 'overrides', text: s_('Integrations|Projects using custom settings'), href: scoped_overrides_integration_path(integration) } if integration.instance_level?
)
].compact
end
def instance_level_integration_overrides?
Feature.enabled?(:instance_level_integration_overrides, default_enabled: :yaml)
end
def jira_issue_breadcrumb_link(issue_reference)
link_to '', { class: 'gl-display-flex gl-align-items-center gl-white-space-nowrap' } do
icon = image_tag image_path('illustrations/logos/jira.svg'), width: 15, height: 15, class: 'gl-mr-2'
......
---
name: instance_level_integration_overrides
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/66723
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/336750
milestone: '14.2'
type: development
group: group::integrations
default_enabled: false
......@@ -61,6 +61,18 @@ integration on all non-configured groups and projects by default.
Resetting an instance-level default setting removes the integration from all projects that have the integration set to use default settings.
### View projects that override the default settings
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/218252) in GitLab 14.2.
You can view which projects in your instance use custom settings that [override the instance-level default settings](#use-custom-settings-for-a-group-or-project-integration)
for an integration.
1. On the top bar, select **Menu >** **{admin}** **Admin**.
1. In the left sidebar, select **Settings > Integrations**.
1. Select an integration.
1. Select the **Projects using custom settings** tab.
## Manage group-level default settings for a project integration
> [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/2543) in GitLab 13.6.
......
......@@ -131,18 +131,6 @@ RSpec.describe Admin::IntegrationsController do
expect(response).to render_template 'shared/integrations/overrides'
expect(assigns(:integration)).to eq(instance_integration)
end
context 'when `instance_level_integration_overrides` is not enabled' do
before do
stub_feature_flags(instance_level_integration_overrides: false)
end
it 'renders a 404' do
subject
expect(response).to have_gitlab_http_status(:not_found)
end
end
end
end
end
......@@ -19,16 +19,4 @@ RSpec.describe 'User activates the instance-level Mattermost Slash Command integ
expect(page).to have_link('Settings', href: edit_path)
expect(page).to have_link('Projects using custom settings', href: overrides_path)
end
context 'when instance_level_integration_overrides is disabled' do
before do
stub_feature_flags(instance_level_integration_overrides: false)
visit_instance_integration('Mattermost slash commands')
end
it 'does not display the overrides tab' do
expect(page).not_to have_link('Settings', href: edit_path)
expect(page).not_to have_link('Projects using custom settings', href: overrides_path)
end
end
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