[openstreetmap/openstreetmap-website] Remove ability to upload/edit traces from blocked users (PR #4129)

Anton Khorev notifications at github.com
Tue Aug 1 17:18:22 UTC 2023


Currently blocks on users act as api write access blocks. Users can still do any modifications not involving the api. Some modifications can be done both through the api and through the web interface. Uploading and editing traces is one of them.

As a result it's impossible to stop users from uploading questionable traces. And if we want to stop them, why should it matter if their uploads are coming through the api or not? Maybe sometimes it matters, for example, if they're using a faulty app, but that's secondary to their ability to upload at all. Although maybe we should let them delete their traces even when blocked.

In this PR users will get this flash message if they try to write or edit traces:

![trace](https://github.com/openstreetmap/openstreetmap-website/assets/4158490/9ea8ba7d-6414-42bd-8822-d556e5a11620)

The button links to the block page.

You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/4129

-- Commit Summary --

  * Remove ability to write traces from blocked users
  * Show link to block in blocked trace flash message
  * Style link in flash block message as a button
  * Make different blocked warning/redirect for trace modification
  * Move trace-specific deny access code to trace controller
  * Define specific current user access denial only for html requests
  * Add trace ability tests

-- File Changes --

    M app/abilities/ability.rb (4)
    M app/controllers/application_controller.rb (8)
    M app/controllers/traces_controller.rb (19)
    A app/views/traces/_blocked_flash.html.erb (4)
    M config/locales/en.yml (4)
    M test/abilities/abilities_test.rb (24)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/4129.patch
https://github.com/openstreetmap/openstreetmap-website/pull/4129.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4129
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/4129 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20230801/0de551e5/attachment.htm>


More information about the rails-dev mailing list