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
This commit is contained in:
+1
-1
@@ -684,5 +684,5 @@ func (hs *HTTPServer) registerRoutes() {
|
|||||||
r.Get("/api/snapshot/shared-options/", reqSignedIn, GetSharingOptions)
|
r.Get("/api/snapshot/shared-options/", reqSignedIn, GetSharingOptions)
|
||||||
r.Get("/api/snapshots/:key", routing.Wrap(hs.GetDashboardSnapshot))
|
r.Get("/api/snapshots/:key", routing.Wrap(hs.GetDashboardSnapshot))
|
||||||
r.Get("/api/snapshots-delete/:deleteKey", reqSnapshotPublicModeOrSignedIn, routing.Wrap(hs.DeleteDashboardSnapshotByDeleteKey))
|
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))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user