Rails 6 (and 5): User Accounts with 3 types of Roles – Devise, Rails Admin, CanCanCan

User accounts of several types are the common functionality of web applications. Ruby on Rails ecosystem provides several helpful gems: Devise for user authentication, CanCanCan for authorization, and RailsAdmin for admin panels.The following article has been moved here from codepany.com blog. The content was updated to the newest Ruby and Rails versions, but it’s still compatible with Rails 5 and Ruby 2.3.0.The article presents how to set up user accounts for two admin roles (superadmin, supervisor) and one end-user role. The admin roles grant access to the admin panel built with Rails Admin. Devise gem handles authentication, and CanCanCan gem does authorization.
Rails 6 (and 5): User Accounts with 3 types of Roles – Devise, Rails Admin, CanCanCan #ruby #rubydeveloper #rubyonrails #devise, #types https://rubyonrails.ba/single/rails-6-and-5-user-accounts-with-3-types-of-roles-devise-rails-admin-cancancan

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles