Closed Emiya0306 closed 8 years ago
It would seem it does not exactly work as advertised, but quite close though. It seems to require the first slash of the url when checking the resource:
acl.allow('guest', '/blogs', ['get', 'post', 'delete', 'view'])
also added an optional parameter to check for /blogs
instead of /blogs/213
, like so:
app.get('/blogs/:id', acl.middleware(1), function(req, res, next) {
Does this solve your problem?
Cool! It works! Thank @akaustel 👍
I follow the README, and write a demo here, but I always get a 'insufficient permissions' error and the code is 500. When I get http://localhost:3000/blogs/213, it will have this error.