debian-mirror-gitlab/app/policies/alert_management/alert_policy.rb
2022-06-21 17:19:12 +05:30

17 lines
472 B
Ruby

# frozen_string_literal: true
module AlertManagement
class AlertPolicy < ::BasePolicy
delegate { @subject.project }
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
end
end