RBAC: Allow access to /dashboards when user has dashboards create (#56712) (#57153)

* RBAC: Allow access to dashboards when user has dashboards create

* Remove eval any that I didn't add on purpose

(cherry picked from commit 3963ed3754)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
This commit is contained in:
Grot (@grafanabot)
2022-10-24 15:57:55 +02:00
committed by GitHub
co-authored by Gabriel MABILLE
parent 1573285f21
commit 509cb77bca
@@ -71,7 +71,9 @@ func (s *ServiceImpl) GetNavTree(c *models.ReqContext, hasEditPerm bool, prefs *
Children: starredItemsLinks,
EmptyMessageId: "starred-empty",
})
}
if hasAccess(ac.ReqSignedIn, ac.EvalAny(ac.EvalPermission(dashboards.ActionDashboardsRead), ac.EvalPermission(dashboards.ActionDashboardsCreate))) {
dashboardChildLinks := s.buildDashboardNavLinks(c, hasEditPerm)
dashboardsUrl := "/dashboards"