diff options
author | Heinrich Lee Yu <hleeyu@gmail.com> | 2019-01-15 16:21:28 +0800 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2019-01-31 16:51:17 +0100 |
commit | 9f67b886b2cf425329a4dc792e6c41cf571ab102 (patch) | |
tree | 47ab49b0caeb53991849b29c18504543573591b1 /app/policies/note_policy.rb | |
parent | 6c0758f69b616374332dce672e3ca0e964274cbc (diff) | |
download | gitlab-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.rb | 1 |
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 |