mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
10 lines
228 B
Ruby
10 lines
228 B
Ruby
require 'rate_limiter'
|
|
class EditRateLimiter < RateLimiter
|
|
def initialize(user)
|
|
super(user, "edit-post", SiteSetting.max_edits_per_day, 1.day.to_i)
|
|
end
|
|
|
|
def build_key(type)
|
|
"#{super(type)}:#{Date.today}"
|
|
end
|
|
end
|