diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-12 00:09:00 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-12 00:09:00 +0300 |
commit | bf217da41b429d80da49287b84dadcbf499ac22c (patch) | |
tree | b3499733d7e1abb88a3f0975333c85d00a80fd96 /app/policies/event_policy.rb | |
parent | 559d99e40299e67969023a1afd23d084fbf23ed1 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/policies/event_policy.rb')
-rw-r--r-- | app/policies/event_policy.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/policies/event_policy.rb b/app/policies/event_policy.rb new file mode 100644 index 00000000000..5587956855e --- /dev/null +++ b/app/policies/event_policy.rb @@ -0,0 +1,9 @@ +# 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 |