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
pull/58718/head
kay delaney 3 years ago committed by GitHub
parent 9855e74b92
commit 59d2cf2ff7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      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))
}

Loading…
Cancel
Save