Fix group search for blobs bug
What does this MR do and why?
Bug: Group-level code searches were redirecting to Projects when global_search_code_enabled: false because the elasticsearch_code_scope setting was being applied to ALL search contexts instead of just global.
Fix: Use :group context instead of :global for scope calculation
References
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
- set
default_search_scopeto'system default'ApplicationSetting.last.update!(default_search_scope: 'system default') - turn off global code search in Admin - Settings - Search - Visibililty and access controls
- advanced search or zoekt (or both) must be enabled for gdk
- set the following feature flags:
search_scope_registryto true,work_item_scope_frontendto false - Then perform a group search for blobs
http://gdk.test:3000/search?group_id=22&scope=blobs&search=MymodifiedMessage
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Siddharth Dungarwal
