Sha256: 310029601eab4bcb0cabaf80c0a2f9d675f1aab2de33ac5d92e2c5d163cc00dd

Contents?: true

Size: 322 Bytes

Versions: 12

Compression:

Stored size: 322 Bytes

Contents

module CmAdmin
  class ApplicationController < ::ActionController::Base
    # before_action :check_cm_admin
    layout 'cm_admin'
    helper CmAdmin::ViewHelpers

    def check_cm_admin
      redirect_to CmAdmin::Engine.mount_path + '/access-denied' unless defined?(::Current) && ::Current.cm_admin_user
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
cm-admin-0.5.7 app/controllers/cm_admin/application_controller.rb
cm-admin-0.5.6 app/controllers/cm_admin/application_controller.rb
cm-admin-0.5.5 app/controllers/cm_admin/application_controller.rb
cm-admin-0.5.4 app/controllers/cm_admin/application_controller.rb
cm-admin-0.5.3 app/controllers/cm_admin/application_controller.rb
cm-admin-0.5.2 app/controllers/cm_admin/application_controller.rb
cm-admin-0.5.0 app/controllers/cm_admin/application_controller.rb
cm-admin-0.4.4 app/controllers/cm_admin/application_controller.rb
cm-admin-0.4.3 app/controllers/cm_admin/application_controller.rb
cm-admin-0.4.2 app/controllers/cm_admin/application_controller.rb
cm-admin-0.4.1 app/controllers/cm_admin/application_controller.rb
cm-admin-0.4.0 app/controllers/cm_admin/application_controller.rb