-
- 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
-
+ skip_before_action :verify_authenticity_token
+ before_action :api_deny_access_handler
+
+ authorize_resource :class => false
+
+ before_action :check_api_readable
+ around_action :api_call_handle_error, :api_call_timeout
+
+ # This is probably the most common call of all. It is used for getting the
+ # OSM data for a specified bounding box, usually for editing. First the
+ # bounding box (bbox) is checked to make sure that it is sane. All nodes
+ # are searched, then all the ways that reference those nodes are found.
+ # All Nodes that are referenced by those ways are fetched and added to the list
+ # of nodes.
+ # Then all the relations that reference the already found nodes and ways are
+ # fetched. All the nodes and ways that are referenced by those ways are then
+ # fetched. Finally all the xml is returned.