Fixes https://github.com/openstreetmap/openstreetmap-website/issues/6794
Clients have a right to know if a note will be allowed in a specific point before they submit it. Let's give them a way to check. I'm going with `GET /api/0.6/notes/allowed?lat=&lon=`. I considered making it into something more generic, to provide for a future where moderation zones cover other elements. However I decided this was premature, and anything more generic can be added in a back-compatible way when the time comes. At the moment, any authenticated request will receive `200 OK`. Unauthenticated requests will get `403 Forbidden` if they point within a moderation zone, and `200 OK` otherwise. You can view, comment on, or merge this pull request online at: https://github.com/openstreetmap/openstreetmap-website/pull/7105 -- Commit Summary -- * Provide API to tell if notes can be placed in a given spot * DRY * DRY (again) -- File Changes -- M app/abilities/api_ability.rb (2) M app/controllers/api/notes_controller.rb (25) M config/routes.rb (1) M test/controllers/api/notes_controller_test.rb (60) -- Patch Links -- https://github.com/openstreetmap/openstreetmap-website/pull/7105.patch https://github.com/openstreetmap/openstreetmap-website/pull/7105.diff -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/7105 You are receiving this because you are subscribed to this thread. Message ID: <openstreetmap/openstreetmap-website/pull/[email protected]>
_______________________________________________ rails-dev mailing list [email protected] https://lists.openstreetmap.org/listinfo/rails-dev
