Commit graph

10 commits

Author SHA1 Message Date
Andy Allan
83425edd8d 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
2024-10-02 16:37:32 +01:00
Tom Hughes
973d62a25e Drop support for basic authentication 2024-09-02 19:00:57 +01:00
Tom Hughes
17bc0853a0 Drop support for OAuth 1 2024-09-01 03:43:02 +03:00
Andy Allan
c1cccd40fc Move check_api_readable to api_controller
It's easier to skip the check in the two places that we need to, and
include it by default everywhere else.
2024-05-29 14:54:16 +01:00
Tom Hughes
7f619c6484 Check API status before authorizing access
Fixes #3530
2022-04-11 20:47:52 +01:00
mmd-osm
c9e836a6cb JSON output added to permissions endpoint 2022-03-08 20:21:35 +01:00
Tom Hughes
608aafbf14 Make /api/0.6/permissions work for OAuth 2 clients 2021-06-27 00:38:16 +01:00
Andy Allan
742291a840 Simplify deny_access handling
Now that we have all api controllers inheriting from a common base,
it's easier to override the deny_access handler without having to
switch between both.

Fixes #2064
2019-03-20 14:39:17 +01:00
Andy Allan
3bb07e29ec Refactor api controllers to inherit from a common ApiController 2019-03-20 14:16:15 +01:00
Andy Allan
8383fd0928 Move the permissions call out of api_controller 2019-02-24 11:00:28 +01:00