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:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-31 18:06:41 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-31 18:06:41 +0300
commit083d64c6468a070ae7b0b406ead8d87da27d1d22 (patch)
treeba92a9b5b6418f805ede9ef05b371d82d2c1d27d /app/helpers/search_helper.rb
parent0be510a49f6e4f8e27b19b707fd1dac61571f78f (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/search_helper.rb')
-rw-r--r--app/helpers/search_helper.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb
index 099609c29ca..777fe82e4c0 100644
--- a/app/helpers/search_helper.rb
+++ b/app/helpers/search_helper.rb
@@ -1,6 +1,8 @@
# frozen_string_literal: true
module SearchHelper
+ SEARCH_PERMITTED_PARAMS = [:search, :scope, :project_id, :group_id, :repository_ref, :snippets].freeze
+
def search_autocomplete_opts(term)
return unless current_user
@@ -200,7 +202,7 @@ module SearchHelper
search_params = params
.merge(search)
.merge({ scope: scope })
- .permit(:search, :scope, :project_id, :group_id, :repository_ref, :snippets)
+ .permit(SEARCH_PERMITTED_PARAMS)
if @scope == scope
li_class = 'active'