Sha256: be0349b743685b46f93a99a0d3bcf7396c8cb8d95c3bf9e372d2bc342203eb0c

Contents?: true

Size: 716 Bytes

Versions: 9

Compression:

Stored size: 716 Bytes

Contents

class ApplicationController < ActionController::Base
  include SslRequirement
  helper :all
  protect_from_forgery

  protected

    # called by Admin::Muck::BaseController to check whether or not the
    # user should have access to the admin UI
    def admin_access_required
      access_denied unless admin?
    end
  
    # only require ssl if we are in production
    def ssl_required?
      return ENV['SSL'] == 'on' ? true : false if defined? ENV['SSL']
      return false if local_request?
      return false if RAILS_ENV == 'test'
      ((self.class.read_inheritable_attribute(:ssl_required_actions) || []).include?(action_name.to_sym)) && (RAILS_ENV == 'production' || RAILS_ENV == 'staging')
    end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
cms-lite-0.5.7 test/rails_root/app/controllers/application_controller.rb
cms-lite-0.5.6 test/rails_root/app/controllers/application_controller.rb
cms-lite-0.5.4 test/rails_root/app/controllers/application_controller.rb
cms-lite-0.5.3 test/rails_root/app/controllers/application_controller.rb
cms-lite-0.5.2 test/rails_root/app/controllers/application_controller.rb
cms-lite-0.4.0 test/rails_root/app/controllers/application_controller.rb
cms-lite-0.4.1 test/rails_root/app/controllers/application_controller.rb
cms-lite-0.5.0 test/rails_root/app/controllers/application_controller.rb
cms-lite-0.5.1 test/rails_root/app/controllers/application_controller.rb