From 47762544fc88684c842700dd423190ddd770b78a Mon Sep 17 00:00:00 2001 From: Tiago Ribeiro Date: Mon, 25 Nov 2024 10:33:37 +0000 Subject: [PATCH] Fixed a problem where users were being redirected to the dashboard --- src/pages/exam.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pages/exam.tsx b/src/pages/exam.tsx index a2063284..a57dba24 100644 --- a/src/pages/exam.tsx +++ b/src/pages/exam.tsx @@ -27,8 +27,7 @@ export const getServerSideProps = withIronSessionSsr(async ({ req, res, query }) const loginDestination = Buffer.from(req.url || "/").toString("base64") if (!user) return redirect(`/login?destination=${loginDestination}`) - if (shouldRedirectHome(user) || checkAccess(user, ["corporate", "mastercorporate"])) - return redirect("/") + if (shouldRedirectHome(user)) return redirect("/") const { assignment: assignmentID, destination } = query as { assignment?: string, destination?: string } const destinationURL = !!destination ? Buffer.from(destination, 'base64').toString() : undefined