mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: invite existing users to private topic
This commit is contained in:
@@ -214,14 +214,12 @@ class Guardian
|
||||
return false unless ( SiteSetting.enable_local_logins && (!SiteSetting.must_approve_users? || is_staff?) )
|
||||
return true if is_admin?
|
||||
return false if ! can_see?(object)
|
||||
|
||||
return false if group_ids.present?
|
||||
|
||||
if object.is_a?(Topic) && object.category
|
||||
if object.category.groups.any?
|
||||
return true if object.category.groups.all? { |g| can_edit_group?(g) }
|
||||
end
|
||||
return false if object.category.read_restricted
|
||||
end
|
||||
|
||||
user.has_trust_level?(TrustLevel[2])
|
||||
|
||||
Reference in New Issue
Block a user