summaryrefslogtreecommitdiff
path: root/app/models/event.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-23 12:08:38 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-23 12:08:38 +0000
commit5ad0cf26551baff8f08af8562a8d45e6ec14d71a (patch)
tree57f1a6bad31bcd11efacd3fdfb9cc92f88fb6a86 /app/models/event.rb
parentf47c768fad17d4c876e96524f83f8306f071db66 (diff)
downloadgitlab-ce-5ad0cf26551baff8f08af8562a8d45e6ec14d71a.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/event.rb')
-rw-r--r--app/models/event.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/app/models/event.rb b/app/models/event.rb
index 9611019adb8..35fb062311f 100644
--- a/app/models/event.rb
+++ b/app/models/event.rb
@@ -145,10 +145,8 @@ class Event < ApplicationRecord
Ability.allowed?(user, :read_issue, note? ? note_target : target)
elsif merge_request? || merge_request_note?
Ability.allowed?(user, :read_merge_request, note? ? note_target : target)
- elsif personal_snippet_note?
- Ability.allowed?(user, :read_personal_snippet, note_target)
- elsif project_snippet_note?
- Ability.allowed?(user, :read_project_snippet, note_target)
+ elsif personal_snippet_note? || project_snippet_note?
+ Ability.allowed?(user, :read_snippet, note_target)
elsif milestone?
Ability.allowed?(user, :read_milestone, project)
else