OptimalBits / node_acl

Access control lists for node applications
2.62k stars 369 forks source link

Dynamic roles #138

Open viztastic opened 9 years ago

viztastic commented 9 years ago

I have three roles that I would like to create:

and one resource:

/api/users/:userId

Is there a way to implement a custom function when creating the ACL role?

eiabea commented 8 years ago

I am currently running into the same issue, i have a route to delete all users, or just one

router.delete("/")
router.delete("/:id")

I set the permissions to

    {
      roles : ['user'],
      allows: [
        {resources: '/user/', permissions: '*'},
      ]
    }

Which allows any user to delete all users, but not a specific one