mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Merge pull request #4137 from cpradio/add-warning-to-flag
FEATURE: Add warning input to flag dialog when notifying a user
This commit is contained in:
@@ -32,6 +32,9 @@ module PostGuardian
|
||||
# new users can't notify_user because they are not allowed to send private messages
|
||||
not(action_key == :notify_user && !@user.has_trust_level?(SiteSetting.min_trust_to_send_messages)) &&
|
||||
|
||||
# non-staff can't send an official warning
|
||||
not(action_key == :notify_user && !is_staff? && opts[:is_warning].present? && opts[:is_warning] == 'true') &&
|
||||
|
||||
# can't send private messages if they're disabled globally
|
||||
not(action_key == :notify_user && !SiteSetting.enable_private_messages) &&
|
||||
|
||||
|
||||
Reference in New Issue
Block a user