make sure user is set

also set to an empty map first to ensure we get what we expect
This commit is contained in:
Paul Rodwell 2016-11-25 17:34:24 +00:00
parent 84d6f253e5
commit 30b5f99d6f

View File

@ -403,7 +403,8 @@ module.exports = exports = (log, loga, argv) ->
app.get '/auth/addAuthDialog', (req, res) -> app.get '/auth/addAuthDialog', (req, res) ->
# only makes sense to add alternative authentication scheme if # only makes sense to add alternative authentication scheme if
# this the user is authenticated # this the user is authenticated
if getUser(req) user = getUser(req)
if user
referer = req.headers.referer referer = req.headers.referer
currentSchemes = _.keys(user) currentSchemes = _.keys(user)