Commit be9ddf35 authored by Justin Ho's avatar Justin Ho

Add feature flag definition and controller check

parent 9a6b9499
...@@ -5,6 +5,7 @@ class Admin::IntegrationsController < Admin::ApplicationController ...@@ -5,6 +5,7 @@ class Admin::IntegrationsController < Admin::ApplicationController
include IntegrationsHelper include IntegrationsHelper
before_action :not_found, unless: -> { instance_level_integrations? } before_action :not_found, unless: -> { instance_level_integrations? }
before_action :not_found, unless: -> { instance_level_integration_overrides? }, only: :overrides
feature_category :integrations feature_category :integrations
...@@ -25,4 +26,8 @@ class Admin::IntegrationsController < Admin::ApplicationController ...@@ -25,4 +26,8 @@ class Admin::IntegrationsController < Admin::ApplicationController
def find_or_initialize_non_project_specific_integration(name) def find_or_initialize_non_project_specific_integration(name)
Integration.find_or_initialize_non_project_specific_integration(name, instance: true) Integration.find_or_initialize_non_project_specific_integration(name, instance: true)
end end
def instance_level_integration_overrides?
Feature.enabled?(:instance_level_integration_overrides, default_enabled: :yaml)
end
end end
---
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::ecosystem
default_enabled: 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