From cca60935e2688e2e820e090eddc62049b0110aca Mon Sep 17 00:00:00 2001 From: Markus Thielker Date: Fri, 4 Apr 2025 16:22:00 +0200 Subject: [PATCH] NORY-59: add component to display insufficient permissions --- .../components/insufficient-permission.tsx | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 dashboard/src/components/insufficient-permission.tsx diff --git a/dashboard/src/components/insufficient-permission.tsx b/dashboard/src/components/insufficient-permission.tsx new file mode 100644 index 0000000..261004a --- /dev/null +++ b/dashboard/src/components/insufficient-permission.tsx @@ -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 ( + + + Insufficient Permission + + You are missing the permission to see this content.
+ If you think this is an error, please contact your system administrator +
+
+ + + Permission: {permission}
+ Relation: {relation}
+ Identity: {identityId} +
+
+
+ ); +}