From d6b11dafd37e78c12c982c42f274928293cdfa53 Mon Sep 17 00:00:00 2001 From: Jarka Kadlecova Date: Thu, 5 Jan 2017 14:36:06 +0100 Subject: Support notes without project --- app/models/concerns/participable.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app/models/concerns') 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 -- cgit v1.2.1