mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Don't autojoin users when they have ready-only permissions (#20213)
After this change, in order to join a chat channel, a user needs to be in a group with at least “Reply” permission for the category. If the user only has “See” permission, they are able to preview the channel, but not join it or send messages. The auto-join function also follows this new restriction. --------- Co-authored-by: Martin Brennan <martin@discourse.org>
This commit is contained in:
@@ -49,7 +49,6 @@ module CategoryGuardian
|
||||
return false unless category
|
||||
return false if is_anonymous?
|
||||
return true if is_admin?
|
||||
return true if !category.read_restricted
|
||||
Category.post_create_allowed(self).exists?(id: category.id)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user