check is grafana admin (#34773) (#34797)

(cherry picked from commit dbef103fb9)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
This commit is contained in:
Grot (@grafanabot)
2021-05-27 11:32:39 +02:00
committed by GitHub
co-authored by Will Browne
parent 47cf96dfee
commit 0d0a795d02
+1 -1
View File
@@ -247,7 +247,7 @@ func (hs *HTTPServer) getFrontendSettingsMap(c *models.ReqContext) (map[string]i
"http2Enabled": hs.Cfg.Protocol == setting.HTTP2Scheme,
"sentry": hs.Cfg.Sentry,
"pluginCatalogURL": hs.Cfg.PluginCatalogURL,
"pluginAdminEnabled": c.HasUserRole(models.ROLE_ADMIN) && hs.Cfg.PluginAdminEnabled && hasPluginManagerApp,
"pluginAdminEnabled": c.IsGrafanaAdmin && hs.Cfg.PluginAdminEnabled && hasPluginManagerApp,
"expressionsEnabled": hs.Cfg.ExpressionsEnabled,
"awsAllowedAuthProviders": hs.Cfg.AWSAllowedAuthProviders,
"awsAssumeRoleEnabled": hs.Cfg.AWSAssumeRoleEnabled,