Преглед изворни кода

Add an error log if activating sudo-mode on login fails

Shane Kilkelly пре 8 година
родитељ
комит
2c47da553b

+ 3 - 1
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}