Sha256: c73f27561124003689c2a815ff368afc9477360e8299340d327d98a3a7fa8305

Contents?: true

Size: 631 Bytes

Versions: 1

Compression:

Stored size: 631 Bytes

Contents

module Ems
  class ApplicationController < ActionController::Base
    # Make sure we only have authenticated users beyond this point
    before_filter :authenticate_user!
    # Also make sure we either have to check cancan or skipit, emtpy is too risky
    check_authorization

    # # Global cancan failure recovery
    # rescue_from CanCan::AccessDenied do |exception|
    #   redirect_to main_app.new_user_session_path, :alert => exception.message
    # end

    # We need to make sure that we are using the ems abilities in the EMS
    def current_ability
      @current_ability ||= Ability.new(current_user)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ems-0.1.7 app/controllers/ems/application_controller.rb