Skip to main content
Previewvendurehq/vendure/feat/4563-refund-destinations

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

Tsx
Signature

Parameters

props

parameterReadonly<PermissionGuardProps>

The props for the PermissionGuard component.

Signature

requires

propertyPermission | string | string[] | Permission[]

The permission(s) required to access the children.

children

propertyReact.ReactNode

The children to render if the user has the required permissions.