=test_update_homework_tests_and_work_log
Some checks failed
CI / build-deploy (push) Has been cancelled
Some checks failed
CI / build-deploy (push) Has been cancelled
This commit is contained in:
@@ -41,10 +41,13 @@ export default auth((req: NextAuthRequest) => {
|
||||
if (pathname.startsWith("/parent/") && role !== "parent") {
|
||||
return NextResponse.redirect(new URL(roleHome(role), req.url))
|
||||
}
|
||||
if (pathname.startsWith("/management/") && role !== "admin" && role !== "teacher") {
|
||||
return NextResponse.redirect(new URL(roleHome(role), req.url))
|
||||
}
|
||||
|
||||
return NextResponse.next()
|
||||
})
|
||||
|
||||
export const config = {
|
||||
matcher: ["/dashboard", "/admin/:path*", "/teacher/:path*", "/student/:path*", "/parent/:path*", "/settings/:path*", "/profile"],
|
||||
matcher: ["/dashboard", "/admin/:path*", "/teacher/:path*", "/student/:path*", "/parent/:path*", "/management/:path*", "/settings/:path*", "/profile"],
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user