class User < ApplicationRecord rolify devise :database_authenticatable, :registerable, :recoverable, :rememberable, :validatable def active_for_authentication? super && !access_revoked end end