Updated the Groups List to allow teachers to view their corporate's students

This commit is contained in:
Tiago Ribeiro
2024-08-16 11:50:27 +01:00
parent 0a28c2bd41
commit 878c7c2ef0
5 changed files with 17 additions and 13 deletions

View File

@@ -28,7 +28,7 @@ export const getServerSideProps = withIronSessionSsr(({req, res}) => {
};
}
if (shouldRedirectHome(user) || !["developer", "admin", "corporate", "agent", "mastercorporate"].includes(user.type)) {
if (shouldRedirectHome(user) || !checkAccess(user, ["admin", "developer", "corporate", "teacher", "mastercorporate"])) {
return {
redirect: {
destination: "/",