Skip to content

Commit

Permalink
[v9.3.x] Navigation: Prevent viewer role accessing dashboard creation…
Browse files Browse the repository at this point in the history
…, import and folder creation (grafana#59009)

Navigation: Prevent viewer role accessing dashboard creation, import and folder creation (grafana#58842)

hide pages related dashboard import create and folder creation for viewer role

(cherry picked from commit 14fbd44)

Co-authored-by: Leo <108552997+lpskdl@users.noreply.github.com>
  • Loading branch information
2 people authored and GuaYounesPW committed Feb 8, 2023
1 parent 0a57a94 commit 79f3910
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions public/app/routes/routes.tsx
Expand Up @@ -83,6 +83,7 @@ export function getAppRoutes(): RouteDescriptor[] {
},
{
path: '/dashboard/new',
roles: () => ['Editor', 'Admin'],
pageClass: 'page-dashboard',
routeName: DashboardRoutes.New,
component: SafeDynamicImport(
Expand Down Expand Up @@ -119,6 +120,7 @@ export function getAppRoutes(): RouteDescriptor[] {
},
{
path: '/dashboard/import',
roles: () => ['Editor', 'Admin'],
component: SafeDynamicImport(
() => import(/* webpackChunkName: "DashboardImport"*/ 'app/features/manage-dashboards/DashboardImportPage')
),
Expand Down Expand Up @@ -168,6 +170,7 @@ export function getAppRoutes(): RouteDescriptor[] {
},
{
path: '/dashboards/folder/new',
roles: () => ['Editor', 'Admin'],
component: SafeDynamicImport(
() => import(/* webpackChunkName: "NewDashboardsFolder"*/ 'app/features/folders/components/NewDashboardsFolder')
),
Expand Down

0 comments on commit 79f3910

Please sign in to comment.