[DMails] Allow janitors to bypass rate limits (#696)

This commit is contained in:
Tarrgon 2024-08-02 10:43:07 -04:00 committed by Cinder
parent 41658607c5
commit 9453a82644

View File

@ -135,7 +135,7 @@ class Dmail < ApplicationRecord
# System user must be able to send dmails at a very high rate, do not rate limit the system user.
return true if bypass_limits == true
return true if from_id == User.system.id
return true if from.is_moderator?
return true if from.is_janitor?
allowed = CurrentUser.can_dmail_with_reason
if allowed != true