Skip to content

Instantly share code, notes, and snippets.

@navarroaxel
Last active August 29, 2015 14:02
Show Gist options
  • Select an option

  • Save navarroaxel/eb2457b4959968273cc9 to your computer and use it in GitHub Desktop.

Select an option

Save navarroaxel/eb2457b4959968273cc9 to your computer and use it in GitHub Desktop.
A user with the correct permission can get a user
/* GET a user */
router.get('/:id', require('permission.js')('canViewUserDetails'), function(req, res) {
res.send('This is the user id ' + req.params.id);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment