[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:
co-authored by
Ryan McKinley
parent
6e7ba7c593
commit
2fbc070fd1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user