Created
May 5, 2014 00:38
-
-
Save jrgleason/bf783dab0d01ee619181 to your computer and use it in GitHub Desktop.
Trying to get connect-roles working with my site
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
connectRule.use(function (req) { | |
if(typeof req.user !== 'undefined'){ | |
req.user.role.active.contains('admin', function(found) { | |
console.log("Something was found "+found); | |
return found; | |
}) | |
} | |
else{ | |
return false; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment