mirror of
https://github.com/grafana/grafana.git
synced 2024-11-26 10:50:37 -06:00
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:
parent
9d7c3a101d
commit
b3aaf544a6
@ -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)
|
||||
|
@ -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')
|
||||
)
|
||||
: () => <Redirect to="/admin" />,
|
||||
component:
|
||||
config.featureToggles.authenticationConfigUI && config.licenseInfo.enabledFeatures?.saml
|
||||
? SafeDynamicImport(
|
||||
() => import(/* webpackChunkName: "AdminAuthentication" */ 'app/features/auth-config/AuthConfigPage')
|
||||
)
|
||||
: () => <Redirect to="/admin" />,
|
||||
},
|
||||
{
|
||||
path: '/admin',
|
||||
|
Loading…
Reference in New Issue
Block a user