Commit Graph

16 Commits

Author SHA1 Message Date
Sam
a9bcdd7f27 PERF: improve speed of rate limiter
Also

- adds a global rate limiter option
- cleans up usage in tests
- fixes freeze_time so it handles clock_gettime
2017-12-04 18:17:30 +11:00
Guo Xiang Tan
5012d46cbd Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
Robin Ward
5d4ee2ca1d FEATURE: Warn a user when they have few likes remaining 2016-03-18 11:30:29 -04:00
Robin Ward
0b4cb5cf0d Add better error messages for rate limits. 2015-09-24 13:52:46 -04:00
Sam
a5b25ad2af FEATURE: scale up likes per day as users increase trust level
tl2 = 1.5 times the likes
tl3 = 2 times the likes
tl4 = 3 times the likes

configurable via tl[234]_additional_likes_per_day_multiplier site setting
2015-04-16 09:44:30 +10:00
Robin Ward
f15b0d205f FIX: The "too similar" check happened when trying to make a post a wiki 2015-02-02 12:44:56 -05:00
Robin Ward
6e862e0e59 FIX: Should flush rate limit keys before testing it 2015-01-29 11:45:12 -05:00
Sam
e0a82d3088 FIX: rate limit password reset email 2014-08-18 10:55:30 +10:00
Sam
7993845bfa add current_user_provider so people can override current_user bevior cleanly, see
http://meta.discourse.org/t/amending-current-user-logic-in-discourse/10278
2013-10-09 15:11:54 +11:00
Sam
bf4bdbefe0 fix redis leak in rate limiter
change key name so there is no overlap with old non-list key
2013-05-28 08:58:45 +10:00
Matt Van Horn
d5958f8779 Sliding window rate limiting
Switched the algorithm to use a circular buffer
based on a redis list
2013-05-25 12:37:28 -07:00
Matt Van Horn
247a0b3ea1 small refactor of RateLimiter for clarity 2013-05-24 13:36:33 -07:00
Sam
5ec52bd2e9 :s/moderator?/staff/g ... our naming was kind of crazy, renamed moderator? to staff 2013-05-02 17:22:27 +10:00
Sam
62c60540be pull moderator into own column, rename trust levels 2013-03-19 21:06:11 -07:00
Gosha Arinich
cafc75b238 remove trailing whitespaces ❤️ 2013-02-26 07:31:35 +03:00
Robin Ward
21b5628528 Initial release of Discourse 2013-02-05 14:16:51 -05:00