Add sudo-mode protection to sessions page

This commit is contained in:
Shane Kilkelly 2017-05-10 11:36:19 +01:00
parent 5a97521b04
commit 16128288a9

View file

@ -94,7 +94,10 @@ module.exports = class Router
webRouter.post '/user/settings', AuthenticationController.requireLogin(), UserController.updateUserSettings
webRouter.post '/user/password/update', AuthenticationController.requireLogin(), UserController.changePassword
webRouter.get '/user/sessions', AuthenticationController.requireLogin(), UserPagesController.sessionsPage
webRouter.get '/user/sessions',
AuthenticationController.requireLogin(),
SudoModeMiddlewear.protectPage,
UserPagesController.sessionsPage
webRouter.post '/user/sessions/clear', AuthenticationController.requireLogin(), UserController.clearSessions
webRouter.delete '/user/newsletter/unsubscribe', AuthenticationController.requireLogin(), UserController.unsubscribe