thomas4019 / expressa

API creation middleware with an admin interface
MIT License
439 stars 27 forks source link

Permission 'delete own' does not work on collections other than 'user' #120

Closed kane-mason closed 4 years ago

kane-mason commented 4 years ago

As the title describes. Trying to delete your own document in a collection other than users will fail with permissions error. I narrowed this down to the collectionPermissionCheck listener where it does not properly cater for deletingOwn since a delete command does not trigger a full retrival of the document to be deleted

thomas4019 commented 4 years ago

Great find! I changed the delete endpoint to load the document since that will make it work. Bug is fixed in latest version 0.5.15