frontend: Separate default repos scope
Created by: ryanslade
Before, fetching default repos would list ALL default repos. These include anything in the default_repos table, user added repos (both public and private) as well as any repos added to the user_public_repos table.
This query was used both for sending the list of repos that Zoekt should index as well as the repos we include when performing a default indexed search.
Since it's used for search, private repos added by any user would appear in search results (although the contents would at least be hidden).
Now, we've split it into two:
-
ListDefault which list all default repos as before.
-
ListDefaultPublicAndUser which lists all public default repos and any private repos added by the current user.
1 will be used by when sending repos to Zoekt for indexing. 2 will be used when performing searches.
Closes: https://github.com/sourcegraph/sourcegraph/issues/20254