diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-04 03:09:37 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-04 03:09:37 +0300 |
commit | e3bdfa1a13d7e6c92716324c78b5b20c07eeb7c6 (patch) | |
tree | e8776263096b027d32d4be5118cccc87b00de2bc /app/controllers/admin | |
parent | c1a50b8195f4e36fda9b233acbde57a449bcf6c3 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers/admin')
-rw-r--r-- | app/controllers/admin/integrations_controller.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/controllers/admin/integrations_controller.rb b/app/controllers/admin/integrations_controller.rb index 0d79032233f..4f3be43d14d 100644 --- a/app/controllers/admin/integrations_controller.rb +++ b/app/controllers/admin/integrations_controller.rb @@ -5,6 +5,12 @@ class Admin::IntegrationsController < Admin::ApplicationController private + def find_or_initialize_integration(name) + if name.in?(Service.available_services_names) + "#{name}_service".camelize.constantize.find_or_initialize_by(instance: true) # rubocop:disable CodeReuse/ActiveRecord + end + end + def integrations_enabled? Feature.enabled?(:instance_level_integrations) end |