debian-mirror-gitlab/app/policies/resource_milestone_event_policy.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
406 B
Ruby
Raw Normal View History

2023-03-17 16:20:25 +05:30
# 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