Explorar o código

Viewer not able to delete snapshot

utkarshcmu %!s(int64=9) %!d(string=hai) anos
pai
achega
9d4fa87914
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      pkg/api/api.go

+ 1 - 1
pkg/api/api.go

@@ -78,7 +78,7 @@ func Register(r *macaron.Macaron) {
 	r.Post("/api/snapshots/", bind(m.CreateDashboardSnapshotCommand{}), CreateDashboardSnapshot)
 	r.Get("/api/snapshot/shared-options/", GetSharingOptions)
 	r.Get("/api/snapshots/:key", GetDashboardSnapshot)
-	r.Get("/api/snapshots-delete/:key", DeleteDashboardSnapshot)
+	r.Get("/api/snapshots-delete/:key", reqEditorRole, DeleteDashboardSnapshot)
 
 	// api renew session based on remember cookie
 	r.Get("/api/login/ping", quota("session"), LoginApiPing)