module.exports = function(req, res, next) {
  if (Admin.isSignedIn(req)) {
    sails.log.debug('isAdmin: ' + req.user.email);
    next();
  } else {
    res.forbidden();
  }
};

@@ -150,24 +150,290 @@
     
-res.forbidden();
+if (res.forbidden) %7B%0A      res.forbidden();%0A    %7D else %7B%0A      // when this middleware is used outside of the Sails stack%0A      // (see http.js), it needs to fall back to the standard API%0A      // for http.ServerResponse%0A      res.statusCode = 403;%0A      res.end('Forbidden');%0A    %7D
 %0A  %7D

fix isAdmin middleware