Sha256: ac4166c3769d741988cce9079b19966e72e8c03bb1b2a455f1e2cc9d7e9fc98d

Contents?: true

Size: 721 Bytes

Versions: 5

Compression:

Stored size: 721 Bytes

Contents

module Cms
  class BaseController < Cms::ApplicationController

    before_filter :redirect_to_cms_site
    before_action :authenticate_cms_user!
    before_filter :cms_access_required

    layout 'cms/application'


    # Disables the default security level for actions, meaning they will be available for guests to access.
    # Users will not need to login prior to accessing these methods.
    #
    # @param [Array<Symbol>] methods List of methods to disable security for.
    def self.allow_guests_to(methods)
      skip_before_action :redirect_to_cms_site, only: methods
      skip_before_action :authenticate_cms_user!, only: methods
      skip_before_action :cms_access_required, only: methods
    end

  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
browsercms-artirix-4.0.1.1 app/controllers/cms/base_controller.rb
browsercms-artirix-4.0.0.rc1.art4 app/controllers/cms/base_controller.rb
browsercms-4.0.0.rc1 app/controllers/cms/base_controller.rb
browsercms-4.0.0.beta app/controllers/cms/base_controller.rb
browsercms-4.0.0.alpha app/controllers/cms/base_controller.rb