Auth: Add authentication config frontend routes to api.go (#66931)

* Add auth config frontend routes to api.go

* Remove SAML related endpoints

* Fix routes

* Enable authconfig for Enterprise, Cloud Pro and Advanced

* Fix

* Update public/app/routes/routes.tsx

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>

---------

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
This commit is contained in:
Misi
2023-04-25 13:13:55 +02:00
committed by GitHub
parent 9d7c3a101d
commit b3aaf544a6
2 changed files with 10 additions and 5 deletions

View File

@ -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)