mirror of
https://github.com/massbug/judge4c.git
synced 2026-10-15 15:00:14 +00:00
fix(auth): redirect unauthorized dashboard access to unauthorized page
This commit is contained in:
@@ -24,7 +24,7 @@ export default async function ProtectedLayout({
|
||||
});
|
||||
|
||||
if (!user || !allowedRoles.includes(user.role)) {
|
||||
redirect("/sign-in");
|
||||
redirect("/unauthorized");
|
||||
}
|
||||
|
||||
return <div className="w-full h-full">{children}</div>;
|
||||
|
||||
Reference in New Issue
Block a user