This repository was archived by the owner on Sep 30, 2024. It is now read-only.
fix saved searches and prompts list page for anon users#63961
Merged
Conversation
camdencheek
approved these changes
Jul 19, 2024
Anonymous visitors to Sourcegraph.com were unable to list all public saved searches (at https://sourcegraph.com/saved-searches) and prompts (at https://sourcegraph.com/prompts) for 2 reasons: 1. The namespace selector (filter) was broken for anonymous users and returned an error. Fixed this by just handling this case. 2. The GraphQL resolvers for `savedSearches` and `prompts` prevented anonymous users from listing items because there was no affiliated user and thus the anonymous user was essentially trying to list all. Fixed this by adding a new and well-tested code path for listing only public saved searches or prompts. Test plan: In dotcom mode, visit those 2 pages (`/saved-searches` and `/prompts`).
76bcf09 to
c8a8b99
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Anonymous visitors to Sourcegraph.com were unable to list all public saved searches (at https://sourcegraph.com/saved-searches) and prompts (at https://sourcegraph.com/prompts) for 2 reasons:
savedSearchesandpromptsprevented anonymous users from listing items because there was no affiliated user and thus the anonymous user was essentially trying to list all. Fixed this by adding a new and well-tested code path for listing only public saved searches or prompts.Test plan
In dotcom mode, visit those 2 pages (
/saved-searchesand/prompts).