From 2c47da553b74af5e3ca1054948ad2977802d9f58 Mon Sep 17 00:00:00 2001 From: Shane Kilkelly Date: Thu, 4 Oct 2018 15:03:22 +0100 Subject: [PATCH] Add an error log if activating sudo-mode on login fails --- .../Features/Authentication/AuthenticationController.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/web/app/coffee/Features/Authentication/AuthenticationController.coffee b/services/web/app/coffee/Features/Authentication/AuthenticationController.coffee index 1505af5dcb..bc44e09498 100644 --- a/services/web/app/coffee/Features/Authentication/AuthenticationController.coffee +++ b/services/web/app/coffee/Features/Authentication/AuthenticationController.coffee @@ -77,7 +77,9 @@ module.exports = AuthenticationController = AuthenticationController.afterLoginSessionSetup req, user, (err) -> if err? return next(err) - SudoModeHandler.activateSudoMode user._id, () -> + SudoModeHandler.activateSudoMode user._id, (err) -> + if err? + logger.err {err, user_id: user._id}, "Error activating Sudo Mode on login, continuing" AuthenticationController._clearRedirectFromSession(req) if req.headers?['accept']?.match(/^application\/json.*$/) res.json {redir: redir}