check orgId on delete
This commit is contained in:
@@ -356,6 +356,9 @@ func (hs *HTTPServer) DeleteDashboardSnapshot(c *contextmodel.ReqContext) respon
|
||||
if queryResult == nil {
|
||||
return response.Error(http.StatusNotFound, "Failed to get dashboard snapshot", nil)
|
||||
}
|
||||
if queryResult.OrgID != c.OrgID {
|
||||
return response.Error(http.StatusUnauthorized, "OrgID mismatch", nil)
|
||||
}
|
||||
|
||||
if queryResult.External {
|
||||
err := deleteExternalDashboardSnapshot(queryResult.ExternalDeleteURL)
|
||||
|
||||
Reference in New Issue
Block a user