Sha256: 9ae9c89572d0c18c6fa3949d5dab58ea6cfd76c6f98f52a2d6934ed816e144f4

Contents?: true

Size: 387 Bytes

Versions: 1

Compression:

Stored size: 387 Bytes

Contents

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cm-admin-3.0.15 app/controllers/cm_admin/static_controller.rb