PatternFly

Not authorized

A not authorized component displays an error screen to users when they attempt to view a page that they don't have permission to access.

Examples

Basic not authorized

A basic not authorized component displays a title, a description, and custom actions.

You do not have access to Demo bundle
Description text

Not authorized with custom actions

You can customize the not authorized component to fit your use case by specifying the serviceName to appear in the title, a description of appropriate context for the error, and the actions that a user can take instead.

You do not have access to Demo bundle
Description text

Props

NotAuthorized

*required
NameTypeDefaultDescription
classNamestringCustom className
descriptionReact.ReactNode'Contact your system administrator(s) for more information.'Custom description
iconReact.ComponentTypeLockIconIcon displayed above the title
ouiaIdstring | number'NotAuthorized'Custom OUIA ID
prevPageButtonTextReact.ReactNode'Return to previous page'Custom previous page button text
primaryActionReact.ReactNodenullCustom primary action - there should only be one defined
secondaryActionsReact.ReactNodenullCustom secondary actions
serviceNamestringService name displayed in the title
showReturnButtonbooleantrueShows link to the previous page
titleReact.ReactNode`You do not have access to ${serviceName}`Custom title
toLandingPageTextReact.ReactNode'Go to landing page'Custom landing page button text
toLandingPageUrlstring"."Custom landing page button URL

View source on GitHub

We use cookies on our websites to deliver our online services. Details about how we use cookies and how you may disable them are set out in our Privacy Statement. By using this website you agree to our use of cookies.