modules/orionode/index.js
function checkAuthenticated(req, res, next) {
	if (!req.user) {
		api.writeError(401, res, "Not authenticated");
	} else {
		req.user.workspaceDir = workspaceDir + (req.user.workspace ? "/" + req.user.workspace : "");
		req.user.checkRights = checkRights;
		next();
	}
}
function checkAuthenticated(req, res, next) {
	if (!req.user) {
		api.writeError(401, res, "Not authenticated");
	} else {
		req.user.workspaceDir = workspaceDir + (req.user.workspace ? "/" + req.user.workspace : "");
		req.user.checkRights = checkRights;
		next();
	}
}
function checkAuthenticated ( req , res , next ) { if ( ! req . user ) { api . writeError ( 401 , res , "Not authenticated" ) ; } else { req . user . workspaceDir = workspaceDir + ( req . user . workspace ? "/" + req . user . workspace : "" ) ; req . user . checkRights = checkRights ; next ( ) ; } }
Check if the request is authenticated
@param {XmlHttpRequest} req The original request
@param {XmlHttpResponse} res The orginal response
@param {fn} next The function to advance the Express queue
Check if the request is authenticated