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

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

* Remove eval any that I didn't add on purpose
This commit is contained in:
Gabriel MABILLE 2022-10-18 11:15:52 +02:00 committed by GitHub
parent 65939ce5b1
commit 3963ed3754
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -91,7 +91,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)
dashboardLink := &navtree.NavLink{