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
This commit is contained in:
Andy Allan 2024-10-02 16:37:32 +01:00
parent e8da505518
commit 83425edd8d
18 changed files with 6 additions and 27 deletions

View file

@ -4,7 +4,6 @@ module Api
authorize_resource :class => false
before_action :set_request_formats
around_action :api_call_handle_error, :api_call_timeout
# Show the list of available API versions. This will replace the global
# unversioned capabilities call in due course.