Closed cookie-ag closed 8 years ago
A proposed solution:
node_acl.allow('role01', '/resource01', 'get');
and also set 1 optional parameter (to check for permission for resource /resource01
and not /resource01/57cc79487a6643572fe5813b
). Obviously you should register the middleware according to paths and number of parameters.
app.use(node_acl.middleware(1));
Solves your problem?
Thanks.
Solved by using custom middleware which uses acl.isallowed(). I used req.route.path instead of req.path to normalize params on urls.
Ok. Good. Is this thread still active then?
It fails to work when i do
GET /resource01/57cc79487a6643572fe5813b
it shows/resource01/:param1
but shows the error "insufficient permissions". Please help.