diff options
author | Heinrich Lee Yu <hleeyu@gmail.com> | 2019-01-15 11:21:28 +0300 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2019-01-31 18:51:17 +0300 |
commit | 9f67b886b2cf425329a4dc792e6c41cf571ab102 (patch) | |
tree | 47ab49b0caeb53991849b29c18504543573591b1 /spec/policies | |
parent | 6c0758f69b616374332dce672e3ca0e964274cbc (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 'spec/policies')
-rw-r--r-- | spec/policies/note_policy_spec.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/policies/note_policy_spec.rb b/spec/policies/note_policy_spec.rb index 7e25c53e77c..0e848c74659 100644 --- a/spec/policies/note_policy_spec.rb +++ b/spec/policies/note_policy_spec.rb @@ -28,6 +28,7 @@ describe NotePolicy, mdoels: true do expect(policy).to be_disallowed(:admin_note) expect(policy).to be_disallowed(:resolve_note) expect(policy).to be_disallowed(:read_note) + expect(policy).to be_disallowed(:award_emoji) end end @@ -40,6 +41,7 @@ describe NotePolicy, mdoels: true do expect(policy).to be_allowed(:admin_note) expect(policy).to be_allowed(:resolve_note) expect(policy).to be_allowed(:read_note) + expect(policy).to be_allowed(:award_emoji) end end end |