nearform / udaru

Open source Access Manager for node.js
https://nearform.github.io/udaru
MIT License
124 stars 19 forks source link

no conflict on policy insert, add users allows [] array for consistency #545

Closed cianfoley-nearform closed 6 years ago

cianfoley-nearform commented 6 years ago

@mihaidma, this PR ignores conflicts on insert policy (note: if updates are performed on policy instances, we will throw the conflict error)

this PR also changed validation so that ids in team/user arrays can be empty for consistency to be like policies as per slack channel discussion, if there are entries it also enforces the id validation.

I'm not sure it makes sense to allow empty on PUT, we can add to all if necessary by putting min for each payload array...

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.09%) to 93.141% when pulling f594a50723fe41054c2b7de8ccaeb429e90e699b on no-conflict-on-insert-policy into f7538655faf92e4116bc218e38e1fb142676c8cf on master.