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