module Api
class CapabilitiesController < ApiController
+ skip_before_action :check_api_readable
+
authorize_resource :class => false
before_action :set_request_formats
module Api
class ChangesetCommentsController < ApiController
- before_action :check_api_readable
before_action :check_api_writable
before_action :authorize
module Api
class ChangesetsController < ApiController
- before_action :check_api_readable
before_action :check_api_writable, :only => [:create, :update, :upload, :subscribe, :unsubscribe]
before_action :setup_user_auth, :only => [:show]
before_action :authorize, :only => [:create, :update, :upload, :close, :subscribe, :unsubscribe]
module Api
class MapController < ApiController
- before_action :check_api_readable
-
authorize_resource :class => false
around_action :api_call_handle_error, :api_call_timeout
module Api
class NodesController < ApiController
- before_action :check_api_readable
before_action :check_api_writable, :only => [:create, :update, :delete]
before_action :authorize, :only => [:create, :update, :delete]
module Api
class NotesController < ApiController
- before_action :check_api_readable
before_action :check_api_writable, :only => [:create, :comment, :close, :reopen, :destroy]
before_action :setup_user_auth, :only => [:create, :show]
before_action :authorize, :only => [:close, :reopen, :destroy, :comment]
# nodes, ways and relations are basically identical.
module Api
class OldElementsController < ApiController
- before_action :check_api_readable
before_action :check_api_writable, :only => [:redact]
before_action :setup_user_auth, :only => [:history, :show]
before_action :authorize, :only => [:redact]
module Api
class PermissionsController < ApiController
- before_action :check_api_readable
-
authorize_resource :class => false
before_action :setup_user_auth
module Api
class RelationsController < ApiController
- before_action :check_api_readable
before_action :check_api_writable, :only => [:create, :update, :delete]
before_action :authorize, :only => [:create, :update, :delete]
module Api
class TracepointsController < ApiController
- before_action :check_api_readable
-
authorize_resource
around_action :api_call_handle_error, :api_call_timeout
module Api
class TracesController < ApiController
- before_action :check_api_readable
before_action :check_api_writable, :only => [:create, :update, :destroy]
before_action :set_locale
before_action :authorize
module Api
class UserBlocksController < ApiController
- before_action :check_api_readable
-
authorize_resource
around_action :api_call_handle_error, :api_call_timeout
# Update and read user preferences, which are arbitrary key/val pairs
module Api
class UserPreferencesController < ApiController
- before_action :check_api_readable
before_action :check_api_writable, :only => [:update_all, :update, :destroy]
before_action :authorize
module Api
class UsersController < ApiController
- before_action :check_api_readable
before_action :disable_terms_redirect, :only => [:details]
before_action :setup_user_auth, :only => [:show, :index]
before_action :authorize, :only => [:details, :gpx_files]
module Api
class VersionsController < ApiController
+ skip_before_action :check_api_readable
authorize_resource :class => false
before_action :set_request_formats
module Api
class WaysController < ApiController
- before_action :check_api_readable
before_action :check_api_writable, :only => [:create, :update, :delete]
before_action :authorize, :only => [:create, :update, :delete]
class ApiController < ApplicationController
skip_before_action :verify_authenticity_token
+ before_action :check_api_readable
+
private
##