Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/concerns/issuable_collections_action.rb')
-rw-r--r--app/controllers/concerns/issuable_collections_action.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/controllers/concerns/issuable_collections_action.rb b/app/controllers/concerns/issuable_collections_action.rb
index 7beb86b51fd..b8249345a54 100644
--- a/app/controllers/concerns/issuable_collections_action.rb
+++ b/app/controllers/concerns/issuable_collections_action.rb
@@ -5,6 +5,12 @@ module IssuableCollectionsAction
include IssuableCollections
include IssuesCalendar
+ included do
+ before_action :check_search_rate_limit!, only: [:issues, :merge_requests], if: -> {
+ params[:search].present? && Feature.enabled?(:rate_limit_issuable_searches)
+ }
+ end
+
# rubocop:disable Gitlab/ModuleWithInstanceVariables
def issues
show_alert_if_search_is_disabled