diff --git a/services/web/app/coffee/infrastructure/Server.coffee b/services/web/app/coffee/infrastructure/Server.coffee index c1ce2a92cd..9232e6939d 100644 --- a/services/web/app/coffee/infrastructure/Server.coffee +++ b/services/web/app/coffee/infrastructure/Server.coffee @@ -106,15 +106,6 @@ passport.use(new LocalStrategy( passport.serializeUser(AuthenticationController.serializeUser) passport.deserializeUser(AuthenticationController.deserializeUser) -# standard access to the current user -currentUserMiddleware = (req, res, next) -> - req.currentUser = () -> - req.user - next() - -webRouter.use(currentUserMiddleware) -apiRouter.use(currentUserMiddleware) - # Measure expiry from last request, not last login webRouter.use (req, res, next) -> req.session.touch()