Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarka Kadlecova <jarka@gitlab.com>2017-01-05 16:36:06 +0300
committerJarka Kadlecova <jarka@gitlab.com>2017-01-19 02:38:17 +0300
commitd6b11dafd37e78c12c982c42f274928293cdfa53 (patch)
treee20c62bc3b11b77e366bce2251146d5f5ec86e0c /app/models/concerns
parent270dc22658424ee7f279db99e56c6fc69acd3eb7 (diff)
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