adds auth before filter to verify manager

This commit is contained in:
Juanjo Bazán
2015-10-01 17:59:36 +02:00
parent fe9cd8dc44
commit 20bf9d7186

View File

@@ -6,6 +6,11 @@ class Management::BaseController < ActionController::Base
private
def verify_manager
raise ActionController::RoutingError.new('Not Found') unless current_manager.present?
end
def current_manager
@current_manager ||= Manager.find(session["manager_id"]) if session["manager_id"]
end
end