# * version conflict when POIs and ways are reverted
module Api
- class AmfController < ApplicationController
+ class AmfController < ApiController
include Potlatch
- skip_before_action :verify_authenticity_token
before_action :check_api_writable
# AMF Controller implements its own authentication and authorization checks
module Api
- class CapabilitiesController < ApplicationController
- skip_before_action :verify_authenticity_token
+ class CapabilitiesController < ApiController
before_action :api_deny_access_handler
authorize_resource :class => false
module Api
- class ChangesController < ApplicationController
- skip_before_action :verify_authenticity_token
+ class ChangesController < ApiController
before_action :api_deny_access_handler
authorize_resource :class => false
module Api
- class ChangesetCommentsController < ApplicationController
- skip_before_action :verify_authenticity_token
+ class ChangesetCommentsController < ApiController
before_action :authorize
before_action :api_deny_access_handler
# The ChangesetController is the RESTful interface to Changeset objects
module Api
- class ChangesetsController < ApplicationController
+ class ChangesetsController < ApiController
layout "site"
require "xml/libxml"
- skip_before_action :verify_authenticity_token
before_action :authorize, :only => [:create, :update, :upload, :close, :subscribe, :unsubscribe]
before_action :api_deny_access_handler, :only => [:create, :update, :upload, :close, :subscribe, :unsubscribe, :expand_bbox]
module Api
- class MapController < ApplicationController
- skip_before_action :verify_authenticity_token
+ class MapController < ApiController
before_action :api_deny_access_handler
authorize_resource :class => false
# The NodeController is the RESTful interface to Node objects
module Api
- class NodesController < ApplicationController
+ class NodesController < ApiController
require "xml/libxml"
- skip_before_action :verify_authenticity_token
before_action :authorize, :only => [:create, :update, :delete]
before_action :api_deny_access_handler
module Api
- class NotesController < ApplicationController
+ class NotesController < ApiController
layout "site", :only => [:mine]
- skip_before_action :verify_authenticity_token
before_action :check_api_readable
before_action :setup_user_auth, :only => [:create, :comment, :show]
before_action :authorize, :only => [:close, :reopen, :destroy]
# into one place. as it turns out, the API methods for historical
# nodes, ways and relations are basically identical.
module Api
- class OldController < ApplicationController
+ class OldController < ApiController
require "xml/libxml"
- skip_before_action :verify_authenticity_token
before_action :setup_user_auth, :only => [:history, :version]
before_action :api_deny_access_handler
before_action :authorize, :only => [:redact]
module Api
- class PermissionsController < ApplicationController
- skip_before_action :verify_authenticity_token
+ class PermissionsController < ApiController
before_action :api_deny_access_handler
authorize_resource :class => false
module Api
- class RelationsController < ApplicationController
+ class RelationsController < ApiController
require "xml/libxml"
- skip_before_action :verify_authenticity_token
before_action :authorize, :only => [:create, :update, :delete]
before_action :api_deny_access_handler
module Api
- class SearchController < ApplicationController
+ class SearchController < ApiController
# Support searching for nodes, ways, or all
# Can search by tag k, v, or both (type->k,value->v)
# Can search by name (k=name,v=....)
- skip_before_action :verify_authenticity_token
authorize_resource :class => false
def search_all
module Api
- class SwfController < ApplicationController
- skip_before_action :verify_authenticity_token
+ class SwfController < ApiController
before_action :check_api_readable
authorize_resource :class => false
module Api
- class TracepointsController < ApplicationController
- skip_before_action :verify_authenticity_token
+ class TracepointsController < ApiController
before_action :api_deny_access_handler
authorize_resource
module Api
- class TracesController < ApplicationController
+ class TracesController < ApiController
layout "site", :except => :georss
- skip_before_action :verify_authenticity_token
before_action :authorize_web
before_action :set_locale
before_action :authorize
# Update and read user preferences, which are arbitrayr key/val pairs
module Api
- class UserPreferencesController < ApplicationController
- skip_before_action :verify_authenticity_token
+ class UserPreferencesController < ApiController
before_action :authorize
authorize_resource
module Api
- class UsersController < ApplicationController
+ class UsersController < ApiController
layout "site", :except => [:api_details]
- skip_before_action :verify_authenticity_token
before_action :disable_terms_redirect, :only => [:api_details]
before_action :authorize, :only => [:api_details, :api_gpx_files]
before_action :api_deny_access_handler
module Api
- class WaysController < ApplicationController
+ class WaysController < ApiController
require "xml/libxml"
- skip_before_action :verify_authenticity_token
before_action :authorize, :only => [:create, :update, :delete]
before_action :api_deny_access_handler
--- /dev/null
+class ApiController < ApplicationController
+ skip_before_action :verify_authenticity_token
+end