summaryrefslogtreecommitdiff
path: root/lib/api/search.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-28 12:08:44 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-28 12:08:44 +0000
commitdb24ab2b72dbff24c201410a0561e929ae7e8061 (patch)
tree67297286aad8cc590ae325330a0bfe1e2a7e51dc /lib/api/search.rb
parent7e8278c0f46cf6058efad5afd0aef177977bd663 (diff)
downloadgitlab-ce-db24ab2b72dbff24c201410a0561e929ae7e8061.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api/search.rb')
-rw-r--r--lib/api/search.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/search.rb b/lib/api/search.rb
index 50f930c7c7c..6b74158930a 100644
--- a/lib/api/search.rb
+++ b/lib/api/search.rb
@@ -47,7 +47,7 @@ module API
SCOPE_ENTITY[params[:scope].to_sym]
end
- def verify_search_scope!
+ def verify_search_scope!(resource:)
# In EE we have additional validation requirements for searches.
# Defining this method here as a noop allows us to easily extend it in
# EE, without having to modify this file directly.
@@ -73,7 +73,7 @@ module API
use :pagination
end
get do
- verify_search_scope!
+ verify_search_scope!(resource: nil)
check_users_search_allowed!
present search, with: entity
@@ -94,7 +94,7 @@ module API
use :pagination
end
get ':id/(-/)search' do
- verify_search_scope!
+ verify_search_scope!(resource: user_group)
check_users_search_allowed!
present search(group_id: user_group.id), with: entity