From 59d2cf2ff790ccc55b82902b66b241c8d809dcb2 Mon Sep 17 00:00:00 2001 From: kay delaney <45561153+kaydelaney@users.noreply.github.com> Date: Mon, 14 Nov 2022 19:13:33 +0000 Subject: [PATCH] Snapshots: Allow user with viewer permissions to delete own snapshots (#58572) Also allows deletion of snapshots whose original dashboard is in a folder which the viewer has explicit edit permissions for --- pkg/api/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/api/api.go b/pkg/api/api.go index 5eb40707bda..ef976fd10eb 100644 --- a/pkg/api/api.go +++ b/pkg/api/api.go @@ -684,5 +684,5 @@ func (hs *HTTPServer) registerRoutes() { r.Get("/api/snapshot/shared-options/", reqSignedIn, GetSharingOptions) r.Get("/api/snapshots/:key", routing.Wrap(hs.GetDashboardSnapshot)) r.Get("/api/snapshots-delete/:deleteKey", reqSnapshotPublicModeOrSignedIn, routing.Wrap(hs.DeleteDashboardSnapshotByDeleteKey)) - r.Delete("/api/snapshots/:key", reqEditorRole, routing.Wrap(hs.DeleteDashboardSnapshot)) + r.Delete("/api/snapshots/:key", reqSignedIn, routing.Wrap(hs.DeleteDashboardSnapshot)) }