Invalid search request resets the project/group selections in sidebar
What does this MR do and why?
The methods project and group should not depend on whether the request is valid or not. It should just be dependent on whether the project or group exists with the supplied project_id or group_id and the user has access to it. The abusive search validation is still there -> https://gitlab.com/gitlab-org/gitlab/-/blob/6229aca66af7338eb68330cf689edfa7b6e9292a/app/services/search_service.rb#L53
References
Screenshots or screen recordings
| Before | After |
|---|---|
![]() |
![]() |
How to set up and validate locally
- On the
masterbranch, perform an abusive search(likefor) on theprojectorgrouplevel for any scope. Notice that theprojectorgroupselection gets reset in the sidebar. - Perform the same search on the MR branch. Notice that the
projectorgroupselection does NOT get reset in the sidebar.
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.
Related to #559073 (closed)
Edited by Ravi Kumar

