Sha256: d7eff6bc98de1c44abcff691d3e0b6cd2ae8c8ceb5e5499eda76e7674557bf56

Contents?: true

Size: 524 Bytes

Versions: 5

Compression:

Stored size: 524 Bytes

Contents

class ApplicationController < ActionController::Base
  # Prevent CSRF attacks by raising an exception.
  # For APIs, you may want to use :null_session instead.
  protect_from_forgery with: :exception
  
  protected

    def authenticate_admin_user!
      if ::Defcon.authenticate_admin_user!(session)
        return true
      else
        redirect_to defcon.defcon_login_path, alert: "Login!"
        return false
      end
    end

    def current_admin_user
      return ::Defcon.current_admin_user(session)
    end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
arcadex-1.3.1 test/test_app/app/controllers/application_controller.rb
arcadex-1.3.0 test/test_app/app/controllers/application_controller.rb
arcadex-1.2.3 test/test_app/app/controllers/application_controller.rb
arcadex-1.2.1 test/test_app/app/controllers/application_controller.rb
arcadex-1.2.0 test/test_app/app/controllers/application_controller.rb