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:
parent
e8da505518
commit
83425edd8d
18 changed files with 6 additions and 27 deletions
|
@ -6,9 +6,8 @@ module Api
|
|||
authorize_resource
|
||||
|
||||
before_action :require_public_data, :only => [:create]
|
||||
|
||||
before_action :set_request_formats
|
||||
around_action :api_call_handle_error
|
||||
around_action :api_call_timeout
|
||||
|
||||
##
|
||||
# Add a comment to a changeset
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue