diff options
author | Jarka Kadlecova <jarka@gitlab.com> | 2017-01-05 14:36:06 +0100 |
---|---|---|
committer | Jarka Kadlecova <jarka@gitlab.com> | 2017-01-18 18:38:17 -0500 |
commit | d6b11dafd37e78c12c982c42f274928293cdfa53 (patch) | |
tree | e20c62bc3b11b77e366bce2251146d5f5ec86e0c /app/models/concerns | |
parent | 270dc22658424ee7f279db99e56c6fc69acd3eb7 (diff) | |
download | gitlab-ce-d6b11dafd37e78c12c982c42f274928293cdfa53.tar.gz |
Support notes without project
Diffstat (limited to 'app/models/concerns')
-rw-r--r-- | app/models/concerns/participable.rb | 6 |
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 |