josx / ra-data-feathers

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

AUTH_GET_PERMISSIONS #45

Closed fonzarely closed 6 years ago

fonzarely commented 6 years ago

This PR provides AUTH_GET_PERMISSIONS to authClient. Permissions are saved in locaStorage, I'm not sure it's relevant but I'm expecting to prevent unnecessary jwt decode. Permissions are decoded in AUTH_GET_PERMISSIONS and not in AUTH_LOGIN due to the fact the token may be provided via oauth so AUTH_LOGIN is not executed.

kfern commented 6 years ago

Could not a service be consulted?

josx commented 6 years ago

Hey, but anyways those permission need to be done on also on backend

kfern commented 6 years ago

I think it is better to query a service instead of managing the permissions on the jwt

josx commented 6 years ago

can we make a option on how to handle it? i will glad to accept a PR on this.

fonzarely commented 6 years ago

@josx I see that my PR tests are failing and you had to fix this. Sorry for that. Could you activate circle CI again?

josx commented 6 years ago

I dont understand why it is not working on PRs. Because i have actived from circleci options to do it. Now i have changed something.

fonzarely commented 6 years ago

I'll let you know for my next PR

josx commented 6 years ago

great!