Closed tomzaoral closed 8 years ago
I would accept a PR with that. I actually haven't messed with the aclQuery stuff much since i forked this project so if you send a PR along with a test/tests for the aclQuery changes you're proposing that'd be great.
Hello there! We are using this Hapi plugin together with Joi validation. The problem is, when using aclQuery, the Joi validation is called after and therefore the parameter which is used in our aclQuery method is invalid (or doesn't exist) and calling this method is pointless.
The solution would be to use Hapi extension point
onPreHandler
instead ofonPostAuth
(you can find here). The difference between these two lifecycle points is thatonPreHandler
is called after path parameters, query and payload is validated.I tried to change it manually and it seems it works as expected. If there is no problem with this change, would you accept PR with that?