Last active
August 29, 2015 14:05
-
-
Save yashprit/4050fbc734fb2d184889 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var authorised = module.exports = function(req, res, next) { | |
//check for cdc token | |
return function(role) { | |
//check roles with userid in userRoleLookupTable | |
} | |
}; | |
var access = authorised(); | |
app.get("/admin", access('admin'), foo.list); | |
app.get("/user", access('user'), foo.show); | |
app.get("/all", access('all'), foo.get) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment