mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FIX: Group members should be able to see their groups even if private
This commit is contained in:
@ -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
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user