summaryrefslogtreecommitdiff
path: root/app/policies/resource_event_policy.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/policies/resource_event_policy.rb')
-rw-r--r--app/policies/resource_event_policy.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/policies/resource_event_policy.rb b/app/policies/resource_event_policy.rb
new file mode 100644
index 00000000000..d8142212927
--- /dev/null
+++ b/app/policies/resource_event_policy.rb
@@ -0,0 +1,5 @@
+# frozen_string_literal: true
+
+class ResourceEventPolicy < BasePolicy
+ condition(:can_read_issuable) { can?(:"read_#{@subject.issuable.to_ability_name}", @subject.issuable) }
+end