UnauthorizedView
UnauthorizedView(
props):Element
Defined in: packages/react/src/components/views/UnauthorizedView.tsx:57
Standalone “you do not have access” page for callers who fail an access
check — typically the adminPanel.access gate.
Renders on its own, without the admin shell: a caller who cannot open the panel should not see its sidebar or navigation, both because those leak the collection and global names they are not entitled to and because the shell’s queries would be denied anyway.
The host app decides how this is reached. Redirecting to a dedicated route outside the guarded segment is the simplest approach; rendering it directly in place of the panel also works and avoids a navigation.
Parameters
Section titled “Parameters”Optional copy overrides and an optional action.
Returns
Section titled “Returns”Element
A centered card stating that access was denied.
Example
Section titled “Example”import { UnauthorizedView } from "@vexcms/react";
export default function Unauthorized() { return ( <UnauthorizedView> <a href="/">Return to site</a> </UnauthorizedView> );}