node_acl icon indicating copy to clipboard operation
node_acl copied to clipboard

Restrictive parent locks nested path

Open sielay opened this issue 9 years ago • 1 comments

I have two rules

/api/cms/.*:
    - get
    - delete
    - post
    - put
/api/.*
    - get

Expected behaviour

  • GET /api/whatever TRUE
  • POST /api/whatever FALSE
  • GET /api/cms/whatever TRUE
  • POST /api/cms/whatever TRUE

Actual behaviour

  • GET /api/whatever TRUE
  • POST /api/whatever FALSE
  • GET /api/cms/whatever TRUE
  • POST /api/cms/whatever FALSE <- this seems working wrong

Why?

In this line

https://github.com/OptimalBits/node_acl/blob/master/lib/acl.js#L883

You use union instead of unions

What do you think about it?

sielay avatar Jul 27 '16 08:07 sielay

Anyone?

sielay avatar Aug 10 '16 19:08 sielay