mmd-osm
5b707ae5ea
Lock note during status update to avoid race condition
2024-08-06 19:51:48 +02:00
Milan Cvetkovic
0db47f3f76
Add Messages API
...
as discussed in [Issue #4509 ](https://wiki.openstreetmap.org/w/index.php?title=Messaging_API_proposal )
and documented in [Messaging API reference](https://wiki.openstreetmap.org/w/index.php?title=Messaging_API_proposal )
2024-07-29 10:42:38 +00: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
Andy Allan
f2aaec4735
Standardise on avoiding except lists for check_api_readable
...
Although this is technically duplicative, it's much easier to read
and therefore to maintain, particularly if you put the _readable one
first.
2024-05-29 14:51:47 +01:00
Andy Allan
995bfa91ff
Remove duplicate database status checks
...
These are already done as part of the api checks
2024-05-29 14:51:20 +01:00
Andy Allan
91fc588556
Add api_status checks for user preferences API
2024-05-29 14:51:20 +01:00
Tom Hughes
ca893c1153
Fix new rubocop warnings
2024-05-21 18:21:56 +01:00
Tom Hughes
64af2816a3
Treat the body as UTF-8 for user_preferences#update
2024-05-16 17:51:33 +01:00
Anton Khorev
588b77244b
Rename api OldController to OldElementsController
2024-04-02 16:11:09 +03:00
Tom Hughes
d2688d4d63
Merge remote-tracking branch 'upstream/pull/4639'
2024-04-01 18:37:27 +01:00
Anton Khorev
c2c5892112
Rename api changesets index template
2024-03-30 08:39:29 +03:00
Anton Khorev
765165777e
Rename api changesets index action
2024-03-30 08:26:58 +03:00
Anton Khorev
558c8765f5
Rename api changeset show template
...
Make template name correspond to action name.
2024-03-30 08:10:24 +03:00
Anton Khorev
fba5528731
Remove require "xml/libxml" from controllers
2024-03-28 11:18:31 +03:00
Tom Hughes
f4b8510744
Merge remote-tracking branch 'upstream/pull/4622'
2024-03-26 18:17:05 +00:00
Anton Khorev
604bba10ec
Remove assert_method from api controllers
2024-03-25 07:15:16 +03:00
Anton Khorev
1e9d390c1e
Replace lookup_user_by_id with load_resource
2024-03-25 06:29:46 +03:00
Anton Khorev
9c0d74fe69
Simplify and test downloaded changeset element sorting
2024-03-21 20:02:18 +03:00
Anton Khorev
cbf6b39464
Rename api element version action to show
2024-03-04 11:19:50 +03:00
Tom Hughes
53817fa9e8
Merge remote-tracking branch 'upstream/pull/4251'
2024-02-25 14:06:56 +00:00
Tom Hughes
8e21e4e801
Move mechanics of changeset subscriptions into the model
2024-02-25 09:48:11 +00:00
Tom Hughes
33d292e981
Move scheduling of trace import and destruction to the model
2024-02-24 17:07:38 +00:00
Tom Hughes
2153e00f9f
Drop ACL check from notes#comment as we no longer allow anonymous comments
2023-11-23 16:56:07 +00:00
Tom Hughes
f08fb4f30f
Prevent API tokens without write_notes creating attributed comments
...
Fixes #4362
2023-11-22 12:30:39 +00:00
Anton Khorev
f23993a4df
Remove 'need to return bbox' comment on conditions_bbox
2023-11-21 13:55:35 +03:00
Tom Hughes
ba503e02d2
Enforce rate limit for API calls which make changes
2023-11-02 08:59:57 +00:00
Andy Allan
1700c23dd1
Prefer find_by() instead of where().first
...
These are very similar, differing only if we would expect multiple
results and the sorting is important. However, in all our cases
we're only expecting one result to be returned, and so find_by is
easier to read.
2023-10-04 17:53:58 +01:00
Anton Khorev
e22589f946
Show hidden comments to moderators if requested
2023-10-01 19:50:27 +03:00
Tom Hughes
85b17a1f2a
Merge remote-tracking branch 'upstream/pull/4240'
2023-09-14 17:42:04 +01:00
Anton Khorev
9c9edb6054
Remove authorize_web call from traces api controller
2023-09-09 19:40:28 +03:00
Anton Khorev
71654e563e
Add show user block api endpoint
2023-09-09 15:53:22 +03:00
Tom Hughes
be3baea4de
Merge remote-tracking branch 'upstream/pull/4222'
2023-09-03 18:54:18 +01:00
Anton Khorev
11df872c3e
Add bbox parameter to notes search api
2023-09-03 11:26:05 +03:00
Anton Khorev
0ef4a299bb
Check required bbox parameter presence outside of BoundingBox class
2023-09-03 09:47:27 +03:00
Tom Hughes
704781ad0b
Add some additional preloads to notes#feed
2023-09-02 11:44:59 +01:00
Tom Hughes
f32b4bc044
Move changeset comment rate limit check to a predicate method
2023-08-30 18:36:33 +01:00
Andy Allan
f5db9cbb20
Avoid using _id in queries
...
This makes the queries shorter and easier to read.
2023-08-30 17:08:16 +01:00
Andy Allan
a1657f03a8
Merge pull request #4202 from tomhughes/changeset-comment-limit
...
Add rate limiting for changeset comments
2023-08-30 11:12:40 +01:00
Tom Hughes
c7a31ebc5d
Restore ordering of results from the users#index API call
2023-08-26 17:41:22 +01:00
ENT8R
be96aa7cb4
Sort users by their ids
2023-08-26 10:14:40 +02:00
ENT8R
b9c85c2697
Use where instead of find to prevent 404
2023-08-26 00:31:18 +02:00
Tom Hughes
a274726f46
Add rate limiting for changeset comments
...
Fixes #4196
2023-08-25 19:53:04 +01:00
Anton Khorev
0bd5838f51
Respond with plaintext when user not found in changeset query
...
The response used to be of type xml with empty body, which is not valid xml.
2023-08-19 20:26:13 +03:00
Anton Khorev
bc9f081841
Move note query limit values to settings
2023-08-19 05:06:00 +03:00
Tom Hughes
c58f4e4813
Make the versions call default to XML
2023-08-18 19:26:53 +01:00
Anton Khorev
5016defff0
Add 'from' and 'to' changeset query parameters
2023-08-15 19:29:06 +03:00
Anton Khorev
86f254380b
Revert misleading comment about time restriction
...
Was added in afe8dd51ec (diff-22d3daaccac3ac960d6dbb47e9c6a9d15b0b4cffbbf9ad32d525600f562827f1R420)
2023-08-15 19:29:06 +03:00
Anton Khorev
7bca06a3d3
Disallow changesets query with both time and order=oldest
2023-08-15 19:29:06 +03:00
Anton Khorev
b350c78bc8
Sort changesets by creation time
2023-08-15 19:29:06 +03:00
Tom Hughes
702c071e19
Sort changesets by close time to match selection
...
This ensures that the sort can be optimised using the index
when selecting by time.
2023-08-13 19:09:54 +01:00