Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Document limit proc

Oliver Günther37a36611a82c
diff --git a/lib/open_project/rate_limiting/base.rb b/lib/open_project/rate_limiting/base.rb
index bef7ca87c06..8805cc2fcb2 100644
--- a/lib/open_project/rate_limiting/base.rb
+++ b/lib/open_project/rate_limiting/base.rb
@@ -56,6 +56,11 @@ module OpenProject
protected
+ # Provide a limit callback proc for the request, or use the default limit
+ # e.g.,
+ # def limit
+ # proc { |req| req.env["REMOTE_USER"] == "admin" ? 100 : 1 }
+ # end
def limit
settings[:limit].presence || default_limit
end