mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
ExploreMetrics: disable route if disabled (or missing permissions) (#90278)
* fix: ExploreMetrics require `datasources:explore` * fix: don't allow routing to explore/metrics if not enabled
This commit is contained in:
parent
8f4b76a3de
commit
698f8e2589
@ -505,10 +505,11 @@ export function getAppRoutes(): RouteDescriptor[] {
|
|||||||
() => import(/* webpackChunkName: "NotificationsPage"*/ 'app/features/notifications/NotificationsPage')
|
() => import(/* webpackChunkName: "NotificationsPage"*/ 'app/features/notifications/NotificationsPage')
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
config.featureToggles.exploreMetrics && {
|
||||||
path: '/explore/metrics',
|
path: '/explore/metrics',
|
||||||
chromeless: false,
|
chromeless: false,
|
||||||
exact: false,
|
exact: false,
|
||||||
|
roles: () => contextSrv.evaluatePermission([AccessControlAction.DataSourcesExplore]),
|
||||||
component: SafeDynamicImport(
|
component: SafeDynamicImport(
|
||||||
() => import(/* webpackChunkName: "DataTrailsPage"*/ 'app/features/trails/DataTrailsPage')
|
() => import(/* webpackChunkName: "DataTrailsPage"*/ 'app/features/trails/DataTrailsPage')
|
||||||
),
|
),
|
||||||
|
Loading…
Reference in New Issue
Block a user