Skip to content

Instantly share code, notes, and snippets.

@simplyb
Created October 20, 2014 15:53
module.exports = function(req, res, next) {
if (!req.current_user.isAdmin()) {
req.body.owner_id = req.current_user.id;
}
return next();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment