From f5ec4bcbd238e5b9e5c218763cf4ddab4b064a6e Mon Sep 17 00:00:00 2001 From: Karl Persson Date: Fri, 20 May 2022 11:52:29 +0200 Subject: [PATCH] remove action to manage plugin that is not used or documented (#49309) --- pkg/api/index.go | 2 +- pkg/services/accesscontrol/models.go | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/pkg/api/index.go b/pkg/api/index.go index 9041df91674..7c7dd52ad1d 100644 --- a/pkg/api/index.go +++ b/pkg/api/index.go @@ -632,7 +632,7 @@ func (hs *HTTPServer) buildAdminNavLinks(c *models.ReqContext) []*dtos.NavLink { }) } - if hs.Cfg.PluginAdminEnabled && hasAccess(ac.ReqGrafanaAdmin, ac.EvalPermission(ac.ActionPluginsManage)) { + 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", }) diff --git a/pkg/services/accesscontrol/models.go b/pkg/services/accesscontrol/models.go index 2552a1eb17f..ca0ef468c49 100644 --- a/pkg/services/accesscontrol/models.go +++ b/pkg/services/accesscontrol/models.go @@ -327,9 +327,6 @@ const ( // Datasources actions ActionDatasourcesExplore = "datasources:explore" - // Plugin actions - ActionPluginsManage = "plugins:manage" - // Global Scopes ScopeGlobalUsersAll = "global.users:*"