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

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

10 lines
228 B
Ruby
Raw Normal View History

2021-03-11 19:13:27 +05:30
# frozen_string_literal: true
class EventPolicy < BasePolicy # rubocop:disable Gitlab/NamespacedClass
condition(:visible_to_user) do
subject.visible_to_user?(user)
end
rule { visible_to_user }.enable :read_event
end