Welcome to mirror list, hosted at ThFree Co, Russian Federation.

http_integrations_resolver.rb « alert_management « resolvers « graphql « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 94a72bca7c71ffae637fd03315fb6cc005816272 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

module Resolvers
  module AlertManagement
    class HttpIntegrationsResolver < BaseResolver
      alias_method :project, :synchronized_object

      type Types::AlertManagement::HttpIntegrationType.connection_type, null: true

      def resolve(**args)
        http_integrations
      end

      private

      def http_integrations
        return [] unless Ability.allowed?(current_user, :admin_operations, project)

        ::AlertManagement::HttpIntegrationsFinder.new(project, {}).execute
      end
    end
  end
end