diff --git a/pkg/api/api.go b/pkg/api/api.go index 946b8df7823..df5cca6946a 100644 --- a/pkg/api/api.go +++ b/pkg/api/api.go @@ -107,7 +107,6 @@ func (hs *HTTPServer) registerRoutes() { r.Get("/admin/orgs", authorizeInOrg(ac.UseGlobalOrg, ac.OrgsAccessEvaluator), hs.Index) r.Get("/admin/orgs/edit/:id", authorizeInOrg(ac.UseGlobalOrg, ac.OrgsAccessEvaluator), hs.Index) r.Get("/admin/stats", authorize(ac.EvalPermission(ac.ActionServerStatsRead)), hs.Index) - r.Get("/admin/authentication/ldap", authorize(ac.EvalPermission(ac.ActionLDAPStatusRead)), hs.Index) if hs.Features.IsEnabledGlobally(featuremgmt.FlagStorage) { r.Get("/admin/storage", reqSignedIn, hs.Index) r.Get("/admin/storage/*", reqSignedIn, hs.Index) @@ -223,6 +222,11 @@ func (hs *HTTPServer) registerRoutes() { } r.Get("/admin/authentication/", authorize(evalAuthenticationSettings()), hs.Index) + r.Get("/admin/authentication/ldap", authorize(ac.EvalPermission(ac.ActionLDAPStatusRead)), hs.Index) + if hs.Features.IsEnabledGlobally(featuremgmt.FlagSsoSettingsApi) { + providerParam := ac.Parameter("provider") + r.Get("/admin/authentication/:provider", authorize(ac.EvalPermission(ac.ActionSettingsRead, ac.ScopeSettingsOAuth(providerParam))), hs.Index) + } // authed api r.Group("/api", func(apiRoute routing.RouteRegister) { diff --git a/public/app/routes/routes.tsx b/public/app/routes/routes.tsx index 73cb9df113b..b585400f495 100644 --- a/public/app/routes/routes.tsx +++ b/public/app/routes/routes.tsx @@ -288,7 +288,7 @@ export function getAppRoutes(): RouteDescriptor[] { : () => , }, { - path: '/admin/authentication/advanced/:provider', + path: '/admin/authentication/:provider', roles: () => contextSrv.evaluatePermission([AccessControlAction.SettingsWrite]), component: config.featureToggles.ssoSettingsApi ? SafeDynamicImport(