debian-mirror-gitlab/app/policies/alert_management/alert_policy.rb

18 lines
472 B
Ruby
Raw Normal View History

2020-05-24 23:13:21 +05:30
# frozen_string_literal: true
module AlertManagement
class AlertPolicy < ::BasePolicy
delegate { @subject.project }
2022-06-21 17:19:12 +05:30
rule { can?(:read_alert_management_alert) }.policy do
enable :read_alert_management_metric_image
end
rule { can?(:update_alert_management_alert) }.policy do
enable :upload_alert_management_metric_image
enable :update_alert_management_metric_image
enable :destroy_alert_management_metric_image
end
2020-05-24 23:13:21 +05:30
end
end