mirror of
https://github.com/grafana/grafana.git
synced 2025-02-16 18:34:52 -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))
|
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
|
// authed api
|
||||||
r.Group("/api", func(apiRoute routing.RouteRegister) {
|
r.Group("/api", func(apiRoute routing.RouteRegister) {
|
||||||
// user (signed in)
|
// user (signed in)
|
||||||
|
@ -309,11 +309,12 @@ export function getAppRoutes(): RouteDescriptor[] {
|
|||||||
// ADMIN
|
// ADMIN
|
||||||
{
|
{
|
||||||
path: '/admin/authentication',
|
path: '/admin/authentication',
|
||||||
component: config.featureToggles.authenticationConfigUI
|
component:
|
||||||
? SafeDynamicImport(
|
config.featureToggles.authenticationConfigUI && config.licenseInfo.enabledFeatures?.saml
|
||||||
() => import(/* webpackChunkName: "AdminAuthentication" */ 'app/features/auth-config/AuthConfigPage')
|
? SafeDynamicImport(
|
||||||
)
|
() => import(/* webpackChunkName: "AdminAuthentication" */ 'app/features/auth-config/AuthConfigPage')
|
||||||
: () => <Redirect to="/admin" />,
|
)
|
||||||
|
: () => <Redirect to="/admin" />,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/admin',
|
path: '/admin',
|
||||||
|
Loading…
Reference in New Issue
Block a user