From 3d7fc0161d6cfa9adec74c30f8d56dd3cf2442a8 Mon Sep 17 00:00:00 2001 From: cfngc4594 Date: Tue, 19 May 2026 16:49:14 +0800 Subject: [PATCH] fix(auth): redirect unauthorized dashboard access to unauthorized page --- .../dashboard/usermanagement/components/ProtectedLayout.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/(protected)/dashboard/usermanagement/components/ProtectedLayout.tsx b/src/app/(protected)/dashboard/usermanagement/components/ProtectedLayout.tsx index b3843f1..1ca9cf8 100644 --- a/src/app/(protected)/dashboard/usermanagement/components/ProtectedLayout.tsx +++ b/src/app/(protected)/dashboard/usermanagement/components/ProtectedLayout.tsx @@ -24,7 +24,7 @@ export default async function ProtectedLayout({ }); if (!user || !allowedRoles.includes(user.role)) { - redirect("/sign-in"); + redirect("/unauthorized"); } return
{children}
;