add saved search visibility, draft, and timestamps#63909
Conversation
f358dbb to
86889de
Compare
Check notice
Code scanning / Semgrep OSS
Semgrep Finding: security-semgrep-rules.semgrep-rules.golang.unauthorized-graphql-resolver-rule
Check notice
Code scanning / Semgrep OSS
Semgrep Finding: security-semgrep-rules.semgrep-rules.generic.comment-tagging-rule
Check notice
Code scanning / Semgrep OSS
Semgrep Finding: security-semgrep-rules.semgrep-rules.generic.comment-tagging-rule
Check notice
Code scanning / Semgrep OSS
Semgrep Finding: security-semgrep-rules.semgrep-rules.generic.comment-tagging-rule
d5ab3c2 to
9a20e45
Compare
There was a problem hiding this comment.
Why are we passing in the actorUID rather than using the actor from the context? This is a bit of a departure from the pattern used elsewhere in the database package.
There was a problem hiding this comment.
Ah, that felt implicit to me and I didn't think that it should be done in this layer. But you are 100% right and I see a lot of prior uses here: https://sourcegraph.sourcegraph.com/search?q=context:sourcegraph+f%3Ainternal%2Fdatabase+actor.FromContext&patternType=literal. So I will change it. Thanks!
9d8861b to
eac5f3f
Compare
Saved searches now have: - Visibility (public vs. secret). Only site admins may make a saved search public. Secret saved searches are visible only to their owners (either a user, or all members of the owning org). A public saved search can be viewed by everyone on the instance. - Draft: If a saved search's "draft" checkbox is checked, that means that other people shouldn't use that saved search yet. You're still working on it. - Timestamps: The last user to update a saved search and the creator of the saved search are now recorded. **Visibility will let us make global saved searches for dotcom and for customers to help them discover and share awesome search queries!**
eac5f3f to
58306ca
Compare
Public saved searches will let us make global saved searches for dotcom and for customers to help them discover and share awesome search queries!
Saved searches now have:
Also adds a lot more tests for saved search UI and backend code.
Test plan
Create a saved search. Ensure it's in secret visibility to begin with. As a site admin, make it public. Ensure other users can view it, and no edit buttons are shown. Try changing visibility back and forth.
Changelog