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:
Sam
2016-04-15 16:23:22 +10:00
10 changed files with 72 additions and 2 deletions

View File

@@ -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) &&