Closed marshallswain closed 1 year ago
@fratzinger, why should the first .find
in the above screenshot fail with the given message? It seems like that query should work and return an empty array result. Please enlighten me.
I was able to make the authorize
hook work as an around, before, after hook. An around hook is not technically supposed to return context
, but I did it anyway to make the types simpler. It doesn't break anything if you return context
after calling await next()
.
.
I've used all of the time I have available to work on this PR, so feel free to grab what you want and close.
Hey marshall, thanks for the PR! This marks a milestone for me, because it's the first time you've contributed to one of my repos and not the other way around 😅🎉
Thanks to your work, I continued my work in the dove branch: https://github.com/fratzinger/feathers-casl/tree/dove
And finally released a pre version as feathers-casl@pre
. It got a few new things:
@feathersjs/memory
, @feathersjs/knex
, @feathersjs/mongodb
, feathers-sequelize@pre
feathers-memory
, feathers-knex
, feathers-objection
, feathers-mongodb
, feathers-mongoose
because they aren't compatible with dove (yet) (or at least I don't know of a support)@casl/ability
: To follow best practices feathers-casl
no longer exports stuff from @casl/ability
, so you have to install it on your own and define the ability
with it. A few tests are failing with the newest major release of @casl/ability
(v6), so currently only @casl/ability@5
is supported. But @casl/ability@5
was used in feathers-casl
before. I'll work on that in a future pre release.authorize
can also be used as an around
hook now. I've added tests for @feathersjs/memory
to make sure it works correctly.Things I have to do in future pre releases:
@casl/ability@6
around
hook for checkBasicPermission
feathers-objection
, feathers-mongoose
if they got support for doveThanks again for the work, you have put into this! I close this PR, because I think I got all covered in the dove branch now.
any
to highlight where we need type changes.There are still 3 or 4 broken tests in this PR.