Snapshots: delete from same org (#83111)

delete in org
This commit is contained in:
Ryan McKinley 2024-02-21 08:04:15 -05:00 committed by GitHub
parent 49a3553b94
commit 809c1eaddb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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)