node acl allow permissions

Viewed 404

I'm using node_acl for authorization of my webapp. I want my admin to have access to all the routes, so I have declared acl permissions as below:

acl.allow([
    {
      roles: 'admin',
      allows: [
        { resources: '*', permissions: '*' }
      ]
    },  
    {
      roles: 'guest',
      allows: [
        { resources: '/documentation', permissions: ['get'] }
      ]
    }
]);

I have used acl.addUserRoles to set the role of users but when I tried to make any request using admin user, acl.isAllowed returns false and acl.allowedPermissions of the user returns { routeName: [] }.

Is there something wrong with my acl.allow permissions ?

0 Answers
Related