diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 14:22:11 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 14:22:11 +0000 |
commit | 0c872e02b2c822e3397515ec324051ff540f0cd5 (patch) | |
tree | ce2fb6ce7030e4dad0f4118d21ab6453e5938cdd /lib/banzai/reference_parser/alert_parser.rb | |
parent | f7e05a6853b12f02911494c4b3fe53d9540d74fc (diff) | |
download | gitlab-ce-15.7.0-rc42.tar.gz |
Add latest changes from gitlab-org/gitlab@15-7-stable-eev15.7.0-rc42
Diffstat (limited to 'lib/banzai/reference_parser/alert_parser.rb')
-rw-r--r-- | lib/banzai/reference_parser/alert_parser.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/banzai/reference_parser/alert_parser.rb b/lib/banzai/reference_parser/alert_parser.rb index 7b864d26f67..676c0ac40ef 100644 --- a/lib/banzai/reference_parser/alert_parser.rb +++ b/lib/banzai/reference_parser/alert_parser.rb @@ -5,14 +5,18 @@ module Banzai class AlertParser < BaseParser self.reference_type = :alert + def self.reference_class + AlertManagement::Alert + end + def references_relation AlertManagement::Alert end private - def can_read_reference?(user, alert, node) - can?(user, :read_alert_management_alert, alert) + def can_read_reference?(user, project, node) + can?(user, :read_alert_management_alert, project) end end end |