diff --git a/apps/frontend/src/middleware.ts b/apps/frontend/src/middleware.ts index 10dcd4f..7dda2e3 100644 --- a/apps/frontend/src/middleware.ts +++ b/apps/frontend/src/middleware.ts @@ -17,7 +17,11 @@ export function middleware(request: NextRequest) { } } - if (request.nextUrl.pathname.startsWith('/periods')) { + if ( + request.nextUrl.pathname.startsWith('/periods') || + request.nextUrl.pathname.startsWith('/roles') || + request.nextUrl.pathname.startsWith('/profile-picture-check') + ) { if (role === 'BODY_MEMBER' || role === 'BODY_ADMIN' || role === 'SUPERUSER') { return NextResponse.next(); } @@ -27,5 +31,13 @@ export function middleware(request: NextRequest) { return NextResponse.next(); } export const config = { - matcher: ['/profile', '/application-form', '/periods', '/applications', '/periods/:path*'], + matcher: [ + '/profile', + '/application-form', + '/periods', + '/applications', + '/periods/:path*', + '/profile-picture-check', + '/roles', + ], };