diff options
author | Byron Jones <glob@mozilla.com> | 2014-11-04 06:38:46 +0100 |
---|---|---|
committer | Byron Jones <glob@mozilla.com> | 2014-11-04 06:38:46 +0100 |
commit | 7dc675fedb5b2631a8bafd0fb691eac485eff0af (patch) | |
tree | 548488280f00fc5e03ef841a2f997fa3fbb1ff73 /Bugzilla/Constants.pm | |
parent | 300d1ba13e050aa1e954dde640092c448184cbba (diff) | |
download | bugzilla-7dc675fedb5b2631a8bafd0fb691eac485eff0af.tar.gz bugzilla-7dc675fedb5b2631a8bafd0fb691eac485eff0af.tar.xz |
Bug 1092037: backport bug 1062739 to bmo (add the ability for administrators to limit the number of emails sent to a user per minute and hour)
Diffstat (limited to 'Bugzilla/Constants.pm')
-rw-r--r-- | Bugzilla/Constants.pm | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Bugzilla/Constants.pm b/Bugzilla/Constants.pm index 37e995b81..6e0a9c7d3 100644 --- a/Bugzilla/Constants.pm +++ b/Bugzilla/Constants.pm @@ -208,6 +208,12 @@ use Memoize; AUDIT_CREATE AUDIT_REMOVE + + EMAIL_LIMIT_PER_MINUTE + EMAIL_LIMIT_PER_HOUR + EMAIL_LIMIT_EXCEPTION + + JOB_QUEUE_VIEW_MAX_JOBS ); @Bugzilla::Constants::EXPORT_OK = qw(contenttypes); @@ -632,6 +638,18 @@ use constant PRIVILEGES_REQUIRED_EMPOWERED => 3; use constant AUDIT_CREATE => '__create__'; use constant AUDIT_REMOVE => '__remove__'; +# The maximum number of emails per minute and hour a recipient can receive. +# Email will be queued/backlogged to avoid exceeeding these limits. +# Setting a limit to 0 will disable this feature. +use constant EMAIL_LIMIT_PER_MINUTE => 1000; +use constant EMAIL_LIMIT_PER_HOUR => 2500; +# Don't change this exception message. +use constant EMAIL_LIMIT_EXCEPTION => "email_limit_exceeded\n"; + +# The maximum number of jobs to show when viewing the job queue +# (view_job_queue.cgi). +use constant JOB_QUEUE_VIEW_MAX_JOBS => 2500; + sub bz_locations { # Force memoize() to re-compute data per project, to avoid # sharing the same data across different installations. |