app/controllers/cm_admin/static_controller.rb



module CmAdmin
  class StaticController < ::ActionController::Base
    layout 'static'

    def dashboard; end

    def index
      fallback_path = current_user.present? ? "#{CmAdmin::Engine.mount_path}/users" : '/users/sign_in'
      redirect_path = current_user&.cm_role&.default_redirect_path || fallback_path
      redirect_to redirect_path
    end

    def error_403; end
  end
end