Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
ced62c5f
Commit
ced62c5f
authored
Dec 10, 2021
by
Dmitry Gruzd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Search API project scope
parent
ce272f6b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
ee/lib/elastic/latest/project_class_proxy.rb
ee/lib/elastic/latest/project_class_proxy.rb
+1
-0
ee/spec/services/search/global_service_spec.rb
ee/spec/services/search/global_service_spec.rb
+10
-0
No files found.
ee/lib/elastic/latest/project_class_proxy.rb
View file @
ced62c5f
...
...
@@ -44,6 +44,7 @@ module Elastic
}
end
query_hash
[
:query
][
:bool
][
:filter
]
||=
[]
query_hash
[
:query
][
:bool
][
:filter
]
+=
filters
end
...
...
ee/spec/services/search/global_service_spec.rb
View file @
ced62c5f
...
...
@@ -24,6 +24,16 @@ RSpec.describe Search::GlobalService do
it_behaves_like
'search query applies joins based on migrations shared examples'
,
:add_new_data_to_merge_requests_documents
end
context
'when projects search has an empty search term'
,
:elastic
do
subject
{
service
.
execute
.
objects
(
'projects'
)
}
let
(
:service
)
{
described_class
.
new
(
nil
,
search:
nil
)
}
it
'does not raise exception'
do
is_expected
.
to
be_empty
end
end
context
'visibility'
,
:elastic_delete_by_query
,
:clean_gitlab_redis_shared_state
,
:sidekiq_inline
do
include_context
'ProjectPolicyTable context'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment