fratzinger / feathers-casl

feathers.js + casl: hooks & channels
https://feathers-casl.netlify.app/
MIT License
40 stars 18 forks source link

Support for custom methods of feathersjs^5? #22

Open fratzinger opened 3 years ago

fratzinger commented 3 years ago

Check and prepare for tests

brniwllnr commented 1 year ago

Just wanted to ask if there are any updates? I just finished my feathersjs-v4 to v5 migration in order to properly use custom-service-methods.

Now my only problem I still have is that i'm getting an "You're not allowed to findLastMessages on 'messages'"-error. Is there already a wait to "allow" my custom method ?

fratzinger commented 1 year ago

Not yet and I don't know when I get to working on that.

For now you can't use feathers-casl for custom method. You need to exclude the hook from your custom method and create your own authorization. Sorry for the inconvenience. I'm happy to accept PRs though.

fratzinger commented 1 year ago

@brniwllnr I have a first implementation for custom methods now. I think this fulfills your use case. I released it as feathers-casl@2.1.0. Please checkout the example in https://github.com/fratzinger/feathers-casl/pull/101