summaryrefslogtreecommitdiff
path: root/app/policies/note_policy.rb
diff options
context:
space:
mode:
authorHeinrich Lee Yu <hleeyu@gmail.com>2019-01-15 16:21:28 +0800
committerYorick Peterse <yorickpeterse@gmail.com>2019-01-31 16:51:17 +0100
commit9f67b886b2cf425329a4dc792e6c41cf571ab102 (patch)
tree47ab49b0caeb53991849b29c18504543573591b1 /app/policies/note_policy.rb
parent6c0758f69b616374332dce672e3ca0e964274cbc (diff)
downloadgitlab-ce-9f67b886b2cf425329a4dc792e6c41cf571ab102.tar.gz
Prevent award_emoji to notes not visible to user
When the parent noteable is not visible to the user (e.g. confidential) we prevent the user from adding emoji reactions to notes
Diffstat (limited to 'app/policies/note_policy.rb')
-rw-r--r--app/policies/note_policy.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/policies/note_policy.rb b/app/policies/note_policy.rb
index f22843b6463..8d23e3abed3 100644
--- a/app/policies/note_policy.rb
+++ b/app/policies/note_policy.rb
@@ -18,6 +18,7 @@ class NotePolicy < BasePolicy
prevent :read_note
prevent :admin_note
prevent :resolve_note
+ prevent :award_emoji
end
rule { is_author }.policy do