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

alert_parser.rb « reference_parser « banzai « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7b864d26f67602c44d1bdfadbdb8a5ba4ac6e19c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

module Banzai
  module ReferenceParser
    class AlertParser < BaseParser
      self.reference_type = :alert

      def references_relation
        AlertManagement::Alert
      end

      private

      def can_read_reference?(user, alert, node)
        can?(user, :read_alert_management_alert, alert)
      end
    end
  end
end