[openstreetmap/openstreetmap-website] Add the ability to rate limit edits (PR #4319)

Mateusz Konieczny notifications at github.com
Mon Oct 30 12:51:46 UTC 2023


@matkoniecz commented on this pull request.



> @@ -407,6 +413,22 @@ def max_changeset_comments_per_hour
     end
   end
 
+  def max_changes_per_hour
+    if moderator?
+      Settings.moderator_changes_per_hour
+    elsif importer?
+      Settings.importer_changes_per_hour
+    else
+      first_change = changesets.reorder(:created_at => :asc).pick(:created_at) || Time.now.utc

would it make sense to have time since first edit, after expiration of last block (if user was ever blocked)

That could help with accounts that mass-imported stuff, got block/zero hour block and then were importing things again on large scale shortly after block expired

(assuming that it is really easy to get latest block expiration and it has no noticeable performance impact)

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4319#pullrequestreview-1704048827
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/4319/review/1704048827 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20231030/f2a4c0b3/attachment.htm>


More information about the rails-dev mailing list