Skip to content

Restrict advanced user search to global level

What does this MR do and why?

Only releases advanced user search for the global level so that we always use basic search for group and project level searches until we can sort out performance issues.

We want to start using elasticsearch for the users scope and don't want that to be blocked by the complexity of group and project filtering.

Note: the feature is still behind a feature flag and will be rolled out accordingly.

Screenshots or screen recordings

Note the Advanced search is enabled notice for the global level, but not on project and group levels:

demo

How to set up and validate locally

  1. Ensure elasticsearch is running
  2. Do a global user search: /search?scope=users&search=name and note that elasticsearch is being used.
  3. Do a group user search: /search?scope=users&search=name&group_id=31 and note that elasticsearch is not being used.
  4. Do a project user search: /search?scope=users&search=name&group_id=31&project_id=6 and note that elasticsearch is not being used.
  5. Disable the feature flag: Feature.disable(:advanced_user_search)
  6. Do a global user search: /search?scope=users&search=name and note that elasticsearch is not being used.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports