You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.
I started implementing this using the new auth hooks. I agree but there are two things I think we should do differently:
We shouldn't limit find in any on the user service. That is up to the developer and will be application specific. For example, pretty common to want to list out users.
Users should be able to remove themselves. I think that is a good starting point. I think anything beyond this, like preventing deletion, soft delete, cascading removal, etc. becomes application specific and isn't our concern.
When generating the hooks for a user service instead of having all the special cases in https://github.com/feathersjs/generator-feathers/blob/master/generators/service/templates/hooks.js it would probably make sense to create a separate
user-hooks.js
file specifically for the user service.It should also add all the hooks necessary to properly harden the endpoint:
find
themselvesget
themselves (even if you know another user's id)update
andpatch
themselves and notremove
anythingThe text was updated successfully, but these errors were encountered: