diff --git a/pkg/api/api.go b/pkg/api/api.go index c19239757b6..72f86ea6a34 100644 --- a/pkg/api/api.go +++ b/pkg/api/api.go @@ -224,6 +224,10 @@ func (hs *HTTPServer) registerRoutes() { r.Get("/user/auth-tokens/rotate", routing.Wrap(hs.RotateUserAuthTokenRedirect)) } + if hs.License.FeatureEnabled("saml") && hs.Features.IsEnabled(featuremgmt.FlagAuthenticationConfigUI) { + r.Get("/admin/authentication/", authorize(reqGrafanaAdmin, ac.EvalPermission(ac.ActionSettingsRead, ac.ScopeSettingsAll)), hs.Index) + } + // authed api r.Group("/api", func(apiRoute routing.RouteRegister) { // user (signed in) diff --git a/public/app/routes/routes.tsx b/public/app/routes/routes.tsx index a41e7ee3f06..96ed930aa70 100644 --- a/public/app/routes/routes.tsx +++ b/public/app/routes/routes.tsx @@ -309,11 +309,12 @@ export function getAppRoutes(): RouteDescriptor[] { // ADMIN { path: '/admin/authentication', - component: config.featureToggles.authenticationConfigUI - ? SafeDynamicImport( - () => import(/* webpackChunkName: "AdminAuthentication" */ 'app/features/auth-config/AuthConfigPage') - ) - : () => , + component: + config.featureToggles.authenticationConfigUI && config.licenseInfo.enabledFeatures?.saml + ? SafeDynamicImport( + () => import(/* webpackChunkName: "AdminAuthentication" */ 'app/features/auth-config/AuthConfigPage') + ) + : () => , }, { path: '/admin',