Sha256: 5541e2f7b83033831665df17330fb2bfb4d6c6e813d5e499acf320cd3ff72a7c

Contents?: true

Size: 485 Bytes

Versions: 35

Compression:

Stored size: 485 Bytes

Contents

module Brightcontent
  class ApplicationController < ActionController::Base
    before_filter :authorize

    private

    def current_user
      @current_user ||= AdminUser.find(session[:brightcontent_user_id]) if session[:brightcontent_user_id]
    end
    helper_method :current_user

    def resource_paths
      @resource_paths ||= RoutesParser.parse
    end
    helper_method :resource_paths

    def authorize
      redirect_to login_url if current_user.nil?
    end

  end
end

Version data entries

35 entries across 35 versions & 2 rubygems

Version Path
brightcontent-core-2.0.30 app/controllers/brightcontent/application_controller.rb
brightcontent-core-2.0.29 app/controllers/brightcontent/application_controller.rb
brightcontent-core-2.0.28 app/controllers/brightcontent/application_controller.rb
brightcontent-core-2.0.27 app/controllers/brightcontent/application_controller.rb
brightcontent-core-2.0.26 app/controllers/brightcontent/application_controller.rb
brightcontent-core-2.0.25 app/controllers/brightcontent/application_controller.rb
brightcontent-core-2.0.24 app/controllers/brightcontent/application_controller.rb
brightcontent-core-2.0.23 app/controllers/brightcontent/application_controller.rb
brightcontent-core-2.0.22 app/controllers/brightcontent/application_controller.rb
brightcontent-core-2.0.21 app/controllers/brightcontent/application_controller.rb
brightcontent-core-2.0.20 app/controllers/brightcontent/application_controller.rb
brightcontent-core-2.0.19 app/controllers/brightcontent/application_controller.rb
brightcontent-core-2.0.18 app/controllers/brightcontent/application_controller.rb
brightcontent-core-2.0.17 app/controllers/brightcontent/application_controller.rb
brightcontent-core-2.0.16 app/controllers/brightcontent/application_controller.rb
brightcontent-core-2.0.15 app/controllers/brightcontent/application_controller.rb
brightcontent-core-2.0.14 app/controllers/brightcontent/application_controller.rb
brightcontent-core-2.0.13 app/controllers/brightcontent/application_controller.rb
brightcontent-core-2.0.12 app/controllers/brightcontent/application_controller.rb
brightcontent-core-2.0.11 app/controllers/brightcontent/application_controller.rb