]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/api_controller.rb
Potlatch whichways and getway. These aren't really Rails, they're just SQL grafted...
[rails.git] / app / controllers / api_controller.rb
index 8091aa67af06e67489a1c55f9394faaf168769ea..7451a91b9b347bc113731f553eb437fcac380196 100644 (file)
@@ -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