Access denied page
Where people land without the role a page needs: which role, who can give it, and a way to switch accounts.
Preview
You don't have access to this page
It needs the Admin role. Ask an admin on your team to give it to you.
Signed in as [email protected]. Switch account
Add it to your project
-
Sign in once on this machine
izzy loginThe account is free. Create a free account
-
Add the block
izzy add block access-deniedWrites Components/Account/Pages/AccessDenied.razor.
Settings
Each setting is a flag on izzy add. The flag syntax isn't final; for now it looks like this:
izzy add block access-denied | Name | Type or choices | Default | Description |
|---|---|---|---|
No items | |||
Mode support
| Feature | Static | Interactive |
|---|---|---|
| Everything | Yes | Yes |
Static: static server-side rendering, with no circuit and no WebAssembly. Interactive: Server, WebAssembly or Auto.
Accessibility
- The page's message is its h1, so it's the first thing a screen reader reads.
- The lock is decorative; the title says what happened.
- Switch account is a button in the sentence that names the account, so it's clear which account it leaves.
Components used
- Container: Centers content at a readable width.
- Column: Stacks fields, cards or text from top to bottom, with even spacing.
- EmptyState: Shows what to do when there's nothing yet.
- Button: Submits or resets a form, follows a link or runs C#.
- TextBlock: Sets paragraphs, captions and labels in the library's text styles.