Welcome to mirror list, hosted at ThFree Co, Russian Federation.

resource_state_event_policy.rb « policies « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 34df2e96eb84234d4787906d726435a877c00ad7 (plain)
1
2
3
4
5
6
7
8
9
10
# frozen_string_literal: true

class ResourceStateEventPolicy < ResourceEventPolicy
  condition(:can_read_issuable) { can?(:"read_#{@subject.issuable.to_ability_name}", @subject.issuable) }

  rule { can_read_issuable }.policy do
    enable :read_resource_state_event
    enable :read_note
  end
end