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