Role Guard
Role-based page access
<AuthProvider>
<AuthGuard>
<RoleGuard>
<AdminLayout>{children}</AdminLayout>
</RoleGuard>
</AuthGuard>
</AuthProvider>Role-based menu access
{
id: 'components',
title: <FormattedMessage id="components" />,
type: 'collapse',
icon: 'IconAppWindow',
roles: [AuthRole.SUPER_ADMIN, AuthRole.ADMIN],
children: [
{
id: 'avatar',
title: <FormattedMessage id="avatar" />,
type: 'item',
url: '/data-display/avatar'
},
{
id: 'button',
title: <FormattedMessage id="button" />,
type: 'item',
url: '/inputs/button'
},
]
}Last updated