1

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?

  • 2
    devise_token_auth is an authentication library.. I would suggest something to manage your roles like CanCanCan and rolify. – Anton Nov 17 '17 at 18:22

0 Answers0