1
0
Fork 0
mirror of https://github.com/overleaf/overleaf.git synced 2025-04-22 12:58:13 +00:00

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

This commit is contained in:
Shane Kilkelly 2018-10-04 15:03:22 +01:00
parent 778abaff6e
commit 2c47da553b

View file

@ -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}