[v10.4.x] Snapshots: delete from same org (#83170)

Snapshots: delete from same org (#83111)

delete in org

(cherry picked from commit 809c1eaddb)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
This commit is contained in:
grafana-delivery-bot[bot]
2024-02-21 15:20:17 +02:00
committed by GitHub
co-authored by Ryan McKinley
parent 6e7ba7c593
commit 2fbc070fd1
+3 -4
View File
@@ -192,10 +192,9 @@ func (hs *HTTPServer) DeleteDashboardSnapshot(c *contextmodel.ReqContext) respon
return response.Error(http.StatusNotFound, "Failed to get dashboard snapshot", nil)
}
// TODO: enforce org ID same
// if queryResult.OrgID != c.OrgID {
// return response.Error(http.StatusUnauthorized, "OrgID mismatch", nil)
// }
if queryResult.OrgID != c.OrgID {
return response.Error(http.StatusUnauthorized, "OrgID mismatch", nil)
}
if queryResult.External {
err := dashboardsnapshots.DeleteExternalDashboardSnapshot(queryResult.ExternalDeleteURL)