X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/343e01bb86da6b346e035796121aba033bb26c29..88a206b0f2979caf066a3127afd3cd71b39da7c8:/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