mirror of
https://github.com/massbug/judge4c.git
synced 2026-05-20 13:18:52 +00:00
fix(auth): redirect unauthorized dashboard access to unauthorized page
This commit is contained in:
parent
f0b69f5768
commit
3d7fc0161d
@ -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>;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user