mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
FEATURE: blocked users can send and reply to private messages from staff
This commit is contained in:
parent
9569235d76
commit
685ba1eb7f
6 changed files with 47 additions and 13 deletions
|
@ -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?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue