mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: blocked users can send and reply to private messages from staff
This commit is contained in:
@@ -256,7 +256,9 @@ class Guardian
|
||||
@user.username == SiteSetting.site_contact_username ||
|
||||
@user == Discourse.system_user) &&
|
||||
# Can't send PMs to suspended users
|
||||
(is_staff? || target.is_a?(Group) || !target.suspended?)
|
||||
(is_staff? || target.is_a?(Group) || !target.suspended?) &&
|
||||
# Blocked users can only send PM to staff
|
||||
(!@user.blocked? || target.staff?)
|
||||
end
|
||||
|
||||
def can_see_emails?
|
||||
|
||||
Reference in New Issue
Block a user