ENCOA-279

This commit is contained in:
Tiago Ribeiro
2024-12-12 15:06:00 +00:00
parent 3e74827c47
commit 240e36f15a
11 changed files with 71 additions and 73 deletions

View File

@@ -39,7 +39,7 @@ interface Props {
export const getServerSideProps = withIronSessionSsr(async ({ req, res }) => {
const user = await requestUser(req, res)
if (!user) return redirect("/login")
if (!user || !user.isVerified) return redirect("/login")
if (!checkAccess(user, ["admin", "developer", "teacher"]))
return redirect("/")