josx / ra-data-feathers

A feathers rest client for react-admin
MIT License
157 stars 53 forks source link

Add AUTH_GET_PERMISSIONS to authClient #43

Closed fonzarely closed 7 years ago

fonzarely commented 7 years ago

It would be nice to add AUTH_GET_PERMISSIONS, but I'm not sure if is relevant to add it to the this lib or decorate the authClient in my app. What are your thoughts ?

josx commented 7 years ago

I think that would be great to support it on authClient.

A few months ago marmelab released aor-permission:

https://github.com/marmelab/aor-permissions https://marmelab.com/blog/2017/06/26/aor-permissions.html

fonzarely commented 7 years ago

Yes I saw that, We have 2 options:

I think we should add the permission management via a function given as parameter to authClient.

I have a big need of this so I'll make it, let me know what you think of my proposition.

josx commented 7 years ago

Pass the permission aside the token, it is a more clean way to handle it, at least at first. (it is less work and later we can decide to upgrade it)

"scratch an itch" is the perfect way to continue developing new features.

fonzarely commented 7 years ago

Added PR https://github.com/josx/aor-feathers-client/pull/45