Sha256: 9ae9c89572d0c18c6fa3949d5dab58ea6cfd76c6f98f52a2d6934ed816e144f4

Contents?: true

Size: 387 Bytes

Versions: 13

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

13 entries across 13 versions & 1 rubygems

Version Path
cm-admin-4.4.8 app/controllers/cm_admin/static_controller.rb
cm-admin-4.4.6 app/controllers/cm_admin/static_controller.rb
cm-admin-4.4.1 app/controllers/cm_admin/static_controller.rb
cm-admin-4.4.0 app/controllers/cm_admin/static_controller.rb
cm-admin-4.3.0 app/controllers/cm_admin/static_controller.rb
cm-admin-4.2.1 app/controllers/cm_admin/static_controller.rb
cm-admin-4.2.0 app/controllers/cm_admin/static_controller.rb
cm-admin-4.1.2 app/controllers/cm_admin/static_controller.rb
cm-admin-4.1.1 app/controllers/cm_admin/static_controller.rb
cm-admin-4.1.0 app/controllers/cm_admin/static_controller.rb
cm-admin-4.0.0 app/controllers/cm_admin/static_controller.rb
cm-admin-3.0.16 app/controllers/cm_admin/static_controller.rb
cm-admin-3.0.15 app/controllers/cm_admin/static_controller.rb