nl_tokens: Requires that the user have the specified role
pl_tokens: function requireRole ( requiredRole ) { return function ( req , res , next ) { if ( ! req . user ) { return next ( superloginError ) ; } var roles = req . user . roles ; if ( ! roles || ! roles . length || roles . indexOf ( requiredRole ) === - 1 ) { res . status ( forbiddenError . status ) ; <mask> . json ( forbiddenError ) ; } else { next ( ) ; } } ; }