Skip to content

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
Screenshot_2025-08-04_at_19.07.04 Screenshot_2025-08-04_at_19.04.44

How to set up and validate locally

  • On the master branch, perform an abusive search(like for) on the project or group level for any scope. Notice that the project or group selection gets reset in the sidebar.
  • Perform the same search on the MR branch. Notice that the project or group selection 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

Merge request reports

Loading