mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Playlists: Remove from menu for users without permissions (#94403)
This commit is contained in:
parent
e1067b817d
commit
19844220db
@ -355,11 +355,13 @@ func (s *ServiceImpl) buildDashboardNavLinks(c *contextmodel.ReqContext) []*navt
|
|||||||
|
|
||||||
dashboardChildNavs := []*navtree.NavLink{}
|
dashboardChildNavs := []*navtree.NavLink{}
|
||||||
|
|
||||||
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 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 s.cfg.SnapshotEnabled {
|
if s.cfg.SnapshotEnabled {
|
||||||
dashboardChildNavs = append(dashboardChildNavs, &navtree.NavLink{
|
dashboardChildNavs = append(dashboardChildNavs, &navtree.NavLink{
|
||||||
Text: "Snapshots",
|
Text: "Snapshots",
|
||||||
|
Loading…
Reference in New Issue
Block a user