2020-11-24 15:15:51 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Banzai
|
|
|
|
module ReferenceParser
|
|
|
|
class AlertParser < BaseParser
|
|
|
|
self.reference_type = :alert
|
|
|
|
|
2023-03-04 22:38:38 +05:30
|
|
|
def self.reference_class
|
|
|
|
AlertManagement::Alert
|
|
|
|
end
|
|
|
|
|
2020-11-24 15:15:51 +05:30
|
|
|
def references_relation
|
|
|
|
AlertManagement::Alert
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
2023-03-04 22:38:38 +05:30
|
|
|
def can_read_reference?(user, project, node)
|
|
|
|
can?(user, :read_alert_management_alert, project)
|
2020-11-24 15:15:51 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|