FIX: Group members should be able to see their groups even if private

This commit is contained in:
Robin Ward
2016-04-26 14:17:53 -04:00
parent b34f55d880
commit de82bd946d
2 changed files with 14 additions and 3 deletions

View File

@ -122,7 +122,11 @@ class Guardian
end
def can_see_group?(group)
group.present? && (is_admin? || group.visible?)
return false if group.blank?
return true if is_admin? || group.visible?
return false if user.blank?
group.group_users.where(user_id: user.id).exists?
end