Zoekt search fails for anonymous user in public group with private projects

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

Discovered in !142833 (merged)

Anonymous users that attempt to search code for a public group that only contains private projects get an unhandled exception

Steps to reproduce

  1. Create a public group
  2. Create a private project in that group
  3. Setup the group for Zoekt
  4. Perform an anonymous code search for the group

What is the current bug behavior?

The project_ids list passed down to the Zoekt client is empty because the user has no permissions to see any projects

What is the expected correct behavior?

The user should not receive an unhandled exception, even a blank screen is better

Relevant logs and/or screenshots

image

Possible fixes

Edited by 🤖 GitLab Bot 🤖