2018-09-25 23:45:43 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-12-30 12:30:25 -05:00
|
|
|
module Projects
|
|
|
|
module Settings
|
|
|
|
class IntegrationsController < Projects::ApplicationController
|
|
|
|
include ServiceParams
|
|
|
|
|
|
|
|
before_action :authorize_admin_project!
|
|
|
|
layout "project_settings"
|
2017-04-28 10:06:03 -04:00
|
|
|
|
2016-12-30 12:30:25 -05:00
|
|
|
def show
|
|
|
|
@hooks = @project.hooks
|
|
|
|
@hook = ProjectHook.new
|
|
|
|
|
|
|
|
# Services
|
2018-05-16 14:39:29 -04:00
|
|
|
@services = @project.find_or_initialize_services(exceptions: service_exceptions)
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
# Returns a list of services that should be hidden from the list
|
|
|
|
def service_exceptions
|
|
|
|
@project.disabled_services.dup
|
2016-12-30 12:30:25 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|