Reputation: 724
I want to implement a multiple user role system, can I integrate devise with pundit and omniauth?
It seems that pundit just offer 2-role authorization, how can I set up 3 roles in pundit?
Like user->premium user->admin.
Upvotes: 0
Views: 463
Reputation: 16
You can add multiple roles on pundit by enumerating different roles in your User model. For example, in your user.rb file(or whatever your model file is called), you can add a line
enum role: [:user, :premium_user, :admin]
and refer to these roles later on.
Upvotes: 0