]> git.openstreetmap.org Git - rails.git/commit
Move api error handling and timeouts to parent class
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 2 Oct 2024 15:37:32 +0000 (16:37 +0100)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 2 Oct 2024 15:37:32 +0000 (16:37 +0100)
commit83425edd8da6a01047702cbb3ac8642f3ef452fa
treee066a3bc164185c4f35ae4262c6a13222836ca5b
parente8da505518490b071ec4d5a0f52d4d4dd9e70246
Move api error handling and timeouts to parent class

Fixes #4861

Since the around_action is defined before authorize_resource is called,
the handler needs to pass on the CanCan::AccessDenied exception.

I've added the timeouts where I think they were missing (e.g. UserPreferencesController)
but I've kept the exception for changeset#upload and traces#create
18 files changed:
app/controllers/api/capabilities_controller.rb
app/controllers/api/changeset_comments_controller.rb
app/controllers/api/changesets_controller.rb
app/controllers/api/map_controller.rb
app/controllers/api/messages_controller.rb
app/controllers/api/nodes_controller.rb
app/controllers/api/notes_controller.rb
app/controllers/api/old_elements_controller.rb
app/controllers/api/permissions_controller.rb
app/controllers/api/relations_controller.rb
app/controllers/api/tracepoints_controller.rb
app/controllers/api/traces_controller.rb
app/controllers/api/user_blocks_controller.rb
app/controllers/api/user_preferences_controller.rb
app/controllers/api/users_controller.rb
app/controllers/api/versions_controller.rb
app/controllers/api/ways_controller.rb
app/controllers/api_controller.rb