Skip to content

Instantly share code, notes, and snippets.

@tthew
Created June 13, 2013 16:44
Show Gist options
  • Select an option

  • Save tthew/5775307 to your computer and use it in GitHub Desktop.

Select an option

Save tthew/5775307 to your computer and use it in GitHub Desktop.
function aclChecker() {
function checkAcl(req, res, next) {
var promise = function () {
var deferred = require('q').defer();
deferred.resolve();
return deferred.promise;
}
promise()
.then(function () {
next();
}, function () {
res.send(new restify.NotAuthorizedError());
});
};
return (checkAcl);
}
module.exports = aclChecker;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment