Skip to content

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.

UnauthorizedViewProps

Optional copy overrides and an optional action.

Element

A centered card stating that access was denied.

app/unauthorized/page.tsx
import { UnauthorizedView } from "@vexcms/react";
export default function Unauthorized() {
return (
<UnauthorizedView>
<a href="/">Return to site</a>
</UnauthorizedView>
);
}