Skip to main content

RequirePermission()

Home > @backstage/plugin-permission-react > RequirePermission

A boundary that only renders its child elements if the user has the specified permission.

While loading, nothing will be rendered. If the user does not have permission, the errorPage element will be rendered, falling back to the NotFoundErrorPage app component if no errorPage is provider.

Signature:

function RequirePermission(props: RequirePermissionProps): JSX.Element | null;

Parameters

ParameterTypeDescription
propsRequirePermissionProps

Returns:

JSX.Element | null