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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Lee Yu <hleeyu@gmail.com>2019-01-15 11:21:28 +0300
committerYorick Peterse <yorickpeterse@gmail.com>2019-01-31 18:51:17 +0300
commit9f67b886b2cf425329a4dc792e6c41cf571ab102 (patch)
tree47ab49b0caeb53991849b29c18504543573591b1 /app/policies
parent6c0758f69b616374332dce672e3ca0e964274cbc (diff)
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')
-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