debian-mirror-gitlab/lib/banzai/reference_parser/alert_parser.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
361 B
Ruby
Raw Normal View History

2020-11-24 15:15:51 +05:30
# 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