Playlists: Remove from menu for users without permissions (#94403)

pull/94413/head^2
Ezequiel Victorero 9 months ago committed by GitHub
parent e1067b817d
commit 19844220db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      pkg/services/navtree/navtreeimpl/navtree.go

@ -355,11 +355,13 @@ func (s *ServiceImpl) buildDashboardNavLinks(c *contextmodel.ReqContext) []*navt
dashboardChildNavs := []*navtree.NavLink{}
if c.IsSignedIn {
if c.SignedInUser.HasRole(org.RoleViewer) {
dashboardChildNavs = append(dashboardChildNavs, &navtree.NavLink{
Text: "Playlists", SubTitle: "Groups of dashboards that are displayed in a sequence", Id: "dashboards/playlists", Url: s.cfg.AppSubURL + "/playlists", Icon: "presentation-play",
})
}
if c.IsSignedIn {
if s.cfg.SnapshotEnabled {
dashboardChildNavs = append(dashboardChildNavs, &navtree.NavLink{
Text: "Snapshots",

Loading…
Cancel
Save