null check user in logging

This commit is contained in:
Henry Oswald 2014-11-10 11:21:59 +00:00
parent 4c905c168a
commit e077108993

View file

@ -72,7 +72,7 @@ module.exports = SecurityManager =
if canModify if canModify
next() next()
else else
logger.log "user_id: #{user._id} email: #{user.email} can not modify project redirecting to restricted page" logger.log "user_id: #{user?._id} email: #{user?.email} can not modify project redirecting to restricted page"
res.redirect('/restricted') res.redirect('/restricted')
userCanModifyProject : userCanModifyProject = (user, project, callback)-> userCanModifyProject : userCanModifyProject = (user, project, callback)->