I've a problem with devise_token_auth in rails api. I need have three different types of users, and each user can see/edit different things.
But i don't know how i can to put before actions in controllers for each user. For example imagine that i have "service" controller with CRUD operations.
- I need that you are one of the three types of user to see index. If you aren't one of the types of users, you can't do anything.
- Admin can CRUD all.
- Other two users only can CR(create-read).
How do you do?