Closed Servaker closed 1 year ago
Thanks for the nice PR! Even with a new test. Perfect!
As this was a bug in feathers-utils
, my desired fix is to leave the code as is and "just" fix it in feathers-utils
. I highly appreciate your work! I continue in #110 which continues this branch. Your contribution will be included.
Thanks! 💚
To fix data filtering when a restriction on allowed fields is set in the
authorizeAfter
function, the parameter for calling thegetItemsIsArray
function was changed from{ from: "result"}
to{ from: "automatic" }
. Which led to the correct setting of theisArray=true
andgetOrFind=find
variables and the correct data filtering in thepickFieldsForItem
function.The after - passes multi with 'pagination' with 'find' rule test has been added to the file '\test\hooks\authorize\authorize.general.test.ts'.
Fix #95