diff options
Diffstat (limited to 'lib/api/merge_requests.rb')
-rw-r--r-- | lib/api/merge_requests.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/api/merge_requests.rb b/lib/api/merge_requests.rb index 34af9eab511..21c1b7969aa 100644 --- a/lib/api/merge_requests.rb +++ b/lib/api/merge_requests.rb @@ -136,6 +136,7 @@ module API end get feature_category: :code_review do authenticate! unless params[:scope] == 'all' + validate_anonymous_search_access! if params[:search].present? merge_requests = find_merge_requests present merge_requests, serializer_options_for(merge_requests) @@ -155,6 +156,7 @@ module API default: true end get ":id/merge_requests", feature_category: :code_review do + validate_anonymous_search_access! if declared_params[:search].present? merge_requests = find_merge_requests(group_id: user_group.id, include_subgroups: true) present merge_requests, serializer_options_for(merge_requests).merge(group: user_group) @@ -195,6 +197,7 @@ module API end get ":id/merge_requests", feature_category: :code_review do authorize! :read_merge_request, user_project + validate_anonymous_search_access! if declared_params[:search].present? merge_requests = find_merge_requests(project_id: user_project.id) |