diff options
Diffstat (limited to 'lib/banzai/reference_parser/alert_parser.rb')
-rw-r--r-- | lib/banzai/reference_parser/alert_parser.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/banzai/reference_parser/alert_parser.rb b/lib/banzai/reference_parser/alert_parser.rb new file mode 100644 index 00000000000..7b864d26f67 --- /dev/null +++ b/lib/banzai/reference_parser/alert_parser.rb @@ -0,0 +1,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 |