class Ability include CanCan::Ability def initialize(user) user ||= User.new # This is used for not logged user if you have a need for it case user.current_role when 'admin' can :manage, :all when 'moderator' can :read, Products can :update, Products cannot :destroy, Products cannot :create, Products cannot :manage, Client # ... other roles and abilities ... end end end