Commit 716599e7 authored by Nick Thomas's avatar Nick Thomas

Fix elasticsearch global code search following...

Fix elasticsearch global code search following https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9655
parent f8618e72
......@@ -33,7 +33,12 @@ module Search
end
def scope
@scope ||= %w[issues merge_requests milestones].delete(params[:scope]) { 'projects' }
@scope ||= begin
allowed_scopes = %w[issues merge_requests milestones]
allowed_scopes += %w[blobs commits] if current_application_settings.elasticsearch_search?
allowed_scopes.delete(params[:scope]) { 'projects' }
end
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment