Re-think rate limiting for resending
authorMagnus Hagander <magnus@hagander.net>
Wed, 19 Jun 2019 19:14:19 +0000 (21:14 +0200)
committerMagnus Hagander <magnus@hagander.net>
Wed, 19 Jun 2019 19:14:19 +0000 (21:14 +0200)
commit6394cfb1c2ad1e69f5904829898197e89b0d1cf4
tree7d7b85bf7c7d77e12545d530aac4172725ca30d3
parent311529269a52c6d24a3da8bdc3cea7d9e80284f3
Re-think rate limiting for resending

The way it was done ended up defeaeting the service sending things right
away for people who did *not* violate the rate limit.

So instead, keep track of exactly when the last email was sent for each
user, and rate-limit based on that.
django/archives/mailarchives/migrations/0004_resend_rate_limit.py [new file with mode: 0644]
django/archives/mailarchives/models.py
django/archives/mailarchives/views.py
resender/archives_resender.py