mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
FIX: ignore min_trust_to_send_messages when messaging groups (#8104)
This means that TL0 users can message groups with "Who can message this group?" set to "Everyone". It also means that members of a group with "Who can message this group?" set to "members, moderators and admins" can also message the group, even when their trust level is below min_trust_to_send_messages.
This commit is contained in:
@ -407,7 +407,7 @@ class Guardian
|
||||
# User is authenticated
|
||||
authenticated? &&
|
||||
# Have to be a basic level at least
|
||||
(@user.has_trust_level?(SiteSetting.min_trust_to_send_messages) || notify_moderators) &&
|
||||
(is_group || @user.has_trust_level?(SiteSetting.min_trust_to_send_messages) || notify_moderators) &&
|
||||
# User disabled private message
|
||||
(is_staff? || is_group || target.user_option.allow_private_messages) &&
|
||||
# PMs are enabled
|
||||
|
Reference in New Issue
Block a user