adds auth before filter to verify manager
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user