Dashboard: Fix dashboard update permission check (#48746) (#48853)

* Change dash permission check for dashboards that are moved to a different folder

(cherry picked from commit 6923b4c6c6)

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
This commit is contained in:
Grot (@grafanabot)
2022-05-10 14:10:59 +02:00
committed by GitHub
co-authored by Ieva
parent bae2055b0b
commit 939156bc2f
3 changed files with 15 additions and 18 deletions
@@ -326,10 +326,6 @@ func getExistingDashboardByIdOrUidForUpdate(sess *sqlstore.DBSession, dash *mode
dash.SetId(existingByUid.Id)
dash.SetUid(existingByUid.Uid)
existing = existingByUid
if !dash.IsFolder {
isParentFolderChanged = true
}
}
if (existing.IsFolder && !dash.IsFolder) ||