PermissionGuard
This component is used to protect a route from unauthorized access. It will render the children if the user has the required permissions.
Example
Parameters
props
parameter
Readonly<PermissionGuardProps>The props for the PermissionGuard component.
requires
property
Permission | string | string[] | Permission[]The permission(s) required to access the children.
children
property
React.ReactNodeThe children to render if the user has the required permissions.
Was this chapter helpful?