check orgId on delete
This commit is contained in:
1 parent
1aea1aad23
commit
2a7adbb2fa
1 file changed
+3
@@ -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