debian-mirror-gitlab/app/policies/resource_milestone_event_policy.rb
2023-06-09 08:11:10 +05:30

14 lines
406 B
Ruby

# frozen_string_literal: true
class ResourceMilestoneEventPolicy < ResourceEventPolicy
condition(:can_read_milestone) { @subject.milestone_id.nil? || can?(:read_milestone, @subject.milestone) }
rule { can_read_milestone }.policy do
enable :read_milestone
end
rule { can_read_milestone & can_read_issuable }.policy do
enable :read_resource_milestone_event
enable :read_note
end
end