On line 93, the following code debug('Check Permission: ' + (req.user.id||req.user.name||"user") + throws an error when user is undefined - so basically any time the user is not authorized. The check itself works, it's just the debug statement that causes issues.
On line 93, the following code
debug('Check Permission: ' + (req.user.id||req.user.name||"user") +
throws an error when user is undefined - so basically any time the user is not authorized. The check itself works, it's just the debug statement that causes issues.