Applied the same fix for other pages

This commit is contained in:
Tiago Ribeiro
2024-03-13 09:21:16 +00:00
parent 49ee3c45e5
commit 74dd96d000
2 changed files with 261 additions and 341 deletions

View File

@@ -22,16 +22,16 @@ export const getServerSideProps = withIronSessionSsr(({req, res}) => {
redirect: {
destination: "/login",
permanent: false,
}
},
};
}
if (shouldRedirectHome(user) || user.type !== "developer") {
if (shouldRedirectHome(user) || !["developer", "admin", "corporate", "agent"].includes(user.type)) {
return {
redirect: {
destination: "/",
permanent: false,
}
},
};
}