Skip to content

Enable edit and delete option for global saved searches

Administrator requested to merge vo/edit-saved-searches into master

Created by: vanesa

Users could not edit or delete Saved Searches that were saved in the global settings (issue: https://github.com/sourcegraph/sourcegraph/issues/369). This was due to the backend not having Site {id, viewerCanAdminister} in the savedQueryFragment graphql to edit the queries. This lead to the unmarshalled query id not matching with the unknown Site id, so that it couldn't proceed with updating/deleting the saved query.

savedQueryFragment now contains Site {id, viewerCanAdminister}.

Furthermore, Non-Siteadmin users should not be able to edit or delete Saved Queries configured at the global level. For this, a true viewerCanAdminister condition was set to show the edit, duplicate and delete option of the Saved Query.

Non-Admin User view of saved queries: image image

This PR updates the CHANGELOG.md file to describe any user-facing changes.

Merge request reports

Loading