summaryrefslogtreecommitdiff
path: root/app/models/concerns
diff options
context:
space:
mode:
authorJarka Kadlecova <jarka@gitlab.com>2017-01-05 14:36:06 +0100
committerJarka Kadlecova <jarka@gitlab.com>2017-01-18 18:38:17 -0500
commitd6b11dafd37e78c12c982c42f274928293cdfa53 (patch)
treee20c62bc3b11b77e366bce2251146d5f5ec86e0c /app/models/concerns
parent270dc22658424ee7f279db99e56c6fc69acd3eb7 (diff)
downloadgitlab-ce-d6b11dafd37e78c12c982c42f274928293cdfa53.tar.gz
Support notes without project
Diffstat (limited to 'app/models/concerns')
-rw-r--r--app/models/concerns/participable.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/concerns/participable.rb b/app/models/concerns/participable.rb
index 70740c76e43..5d8a223fc21 100644
--- a/app/models/concerns/participable.rb
+++ b/app/models/concerns/participable.rb
@@ -96,6 +96,10 @@ module Participable
participants.merge(ext.users)
- Ability.users_that_can_read_project(participants.to_a, project)
+ if self.is_a?(PersonalSnippet)
+ Ability.users_that_can_read_personal_snippet(participants.to_a, self)
+ else
+ Ability.users_that_can_read_project(participants.to_a, project)
+ end
end
end