lib/util/index.js
function loginRequired(fn) {
  return function(req, res, next) {
    if(isLoggedIn(req)) {
      fn(req, res, next);
    } else {
      next(new exceptions.PermissionRequired());
    }
  }
}
function loginRequired(fn) {
  return function(req, res, next) {
    if(isLoggedIn(req)) {
      fn(req, res, next);
    } else {
      next(new exceptions.PermissionRequired());
    }
  }
}
function loginRequired ( fn ) { return function ( req , res , next ) { if ( isLoggedIn ( req ) ) { fn ( req , res , next ) ; } else { next ( new exceptions . PermissionRequired ( ) ) ; } } }
Middleware indicating that the view `fn` requires login
@param fn
@returns {Function}
Middleware indicating that the view fn requires login