X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/343e01bb86da6b346e035796121aba033bb26c29..a4f4714d0e1b1eeabe5e4b411800b949ef1e1139:/app/controllers/api_controller.rb diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb index 8091aa67a..7451a91b9 100644 --- a/app/controllers/api_controller.rb +++ b/app/controllers/api_controller.rb @@ -3,6 +3,13 @@ class ApiController < ApplicationController before_filter :authorize after_filter :compress_output + helper :user + model :user + + def authorize_web + @current_user = User.find_by_token(session[:token]) + end + # The maximum area you're allowed to request, in square degrees MAX_REQUEST_AREA = 0.25