summaryrefslogtreecommitdiff
path: root/app/controllers/projects/settings/integrations_controller.rb
blob: 388fcb32c357b5829e5d9594b1daab34d6fb616f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# frozen_string_literal: true

module Projects
  module Settings
    class IntegrationsController < Projects::ApplicationController
      include ServiceParams

      before_action :authorize_admin_project!
      layout "project_settings"

      def show
        @hooks = @project.hooks
        @hook = ProjectHook.new

        # Services
        @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
      end
    end
  end
end