mirror of
https://codeberg.org/MarkusThielker/next-ory.git
synced 2025-04-13 13:08:41 +00:00
NORY-59: add component to display insufficient permissions
This commit is contained in:
parent
7d7782a92c
commit
48c14c08a2
1 changed files with 36 additions and 0 deletions
36
dashboard/src/components/insufficient-permission.tsx
Normal file
36
dashboard/src/components/insufficient-permission.tsx
Normal file
|
@ -0,0 +1,36 @@
|
|||
import { Card, CardDescription, CardFooter, CardHeader, CardTitle } from '@/components/ui/card';
|
||||
|
||||
interface InsufficientPermissionProps {
|
||||
permission: string;
|
||||
relation: string;
|
||||
identityId: string;
|
||||
classNames?: string;
|
||||
}
|
||||
|
||||
export default async function InsufficientPermission(
|
||||
{
|
||||
permission,
|
||||
relation,
|
||||
identityId,
|
||||
classNames,
|
||||
}: InsufficientPermissionProps,
|
||||
) {
|
||||
return (
|
||||
<Card className={classNames}>
|
||||
<CardHeader>
|
||||
<CardTitle>Insufficient Permission</CardTitle>
|
||||
<CardDescription>
|
||||
You are missing the permission to see this content.<br/>
|
||||
If you think this is an error, please contact your system administrator
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardFooter>
|
||||
<CardDescription className="text-xs">
|
||||
Permission: {permission}<br/>
|
||||
Relation: {relation}<br/>
|
||||
Identity: {identityId}
|
||||
</CardDescription>
|
||||
</CardFooter>
|
||||
</Card>
|
||||
);
|
||||
}
|
Loading…
Add table
Reference in a new issue