Navigation Bar: Remove plugins link under Server Admin (#54386)

* Navigation Bar: Remove plugins link under Server Admin

* Modify frontend to handle admin plugins as just plugins

* update assets and documentation mentioned path

* Fix copy to remove redundant text
This commit is contained in:
Esteban Beltran
2022-08-30 03:40:04 -04:00
committed by GitHub
parent 89236cf418
commit 56bceacfb1
5 changed files with 11 additions and 52 deletions
+1 -7
View File
@@ -366,7 +366,7 @@ func (hs *HTTPServer) setupConfigNodes(c *models.ReqContext) ([]*dtos.NavLink, e
})
}
if c.OrgRole == org.RoleAdmin {
if c.OrgRole == org.RoleAdmin || (hs.Cfg.PluginAdminEnabled && ac.ReqGrafanaAdmin(c)) {
configNodes = append(configNodes, &dtos.NavLink{
Text: "Plugins",
Id: "plugins",
@@ -724,12 +724,6 @@ func (hs *HTTPServer) buildAdminNavLinks(c *models.ReqContext) []*dtos.NavLink {
})
}
if hs.Cfg.PluginAdminEnabled && ac.ReqGrafanaAdmin(c) {
adminNavLinks = append(adminNavLinks, &dtos.NavLink{
Text: "Plugins", Id: "admin-plugins", Url: hs.Cfg.AppSubURL + "/admin/plugins", Icon: "plug",
})
}
return adminNavLinks
}