diff --git a/ExpressAPI/src/middlewares/SecurityMiddleware.ts b/ExpressAPI/src/middlewares/SecurityMiddleware.ts index 6e895ebadbd0faaa22eb6d00a587091e6bcf3ff5..67c03bdf907ef04ebba060c695e401e4ddc087a9 100644 --- a/ExpressAPI/src/middlewares/SecurityMiddleware.ts +++ b/ExpressAPI/src/middlewares/SecurityMiddleware.ts @@ -33,6 +33,9 @@ class SecurityMiddleware { for ( let checkType of checkTypes ) { try { switch ( checkType ) { + case SecurityCheckType.TEACHING_STAFF: + isAllowed = isAllowed || req.session.profile.isTeachingStaff; + break; default: isAllowed = isAllowed || false; break;