From be194e5a8cc1380335860a99d1a7f312ced08e5b Mon Sep 17 00:00:00 2001 From: AntonioTerceiro Date: Wed, 21 May 2008 20:32:44 +0000 Subject: [PATCH] ActionItem295: giving members the hability to see private content --- app/models/profile.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/models/profile.rb b/app/models/profile.rb index 93b753f..2490118 100644 --- a/app/models/profile.rb +++ b/app/models/profile.rb @@ -286,8 +286,12 @@ class Profile < ActiveRecord::Base if self.public_profile true else - # other possibilities would come here - (user == self) + if user.nil? + false + else + # other possibilities would come here + (user == self) || (user.memberships.include?(self)) + end end end -- libgit2 0.21.2