2020-03-13 09:09:23 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class Admin::IntegrationsController < Admin::ApplicationController
|
2020-03-26 06:08:40 +00:00
|
|
|
include IntegrationsActions
|
2020-09-25 21:09:51 +00:00
|
|
|
include ServicesHelper
|
2020-03-13 09:09:23 +00:00
|
|
|
|
2020-10-05 21:08:47 +00:00
|
|
|
feature_category :integrations
|
|
|
|
|
2020-03-13 09:09:23 +00:00
|
|
|
private
|
|
|
|
|
2020-04-04 00:09:37 +00:00
|
|
|
def find_or_initialize_integration(name)
|
2020-08-25 18:10:49 +00:00
|
|
|
Service.find_or_initialize_integration(name, instance: true)
|
2020-04-04 00:09:37 +00:00
|
|
|
end
|
|
|
|
|
2020-03-26 06:08:40 +00:00
|
|
|
def integrations_enabled?
|
2020-09-25 21:09:51 +00:00
|
|
|
instance_level_integrations?
|
2020-03-13 09:09:23 +00:00
|
|
|
end
|
|
|
|
|
2020-03-26 06:08:40 +00:00
|
|
|
def scoped_edit_integration_path(integration)
|
|
|
|
edit_admin_application_settings_integration_path(integration)
|
2020-03-13 09:09:23 +00:00
|
|
|
end
|
|
|
|
end
|