[openstreetmap/openstreetmap-website] Record revokers when deactivating blocks by editing (PR #5094)

Anton Khorev notifications at github.com
Mon Aug 19 12:32:31 UTC 2024


You can deactivate a block using the revoke action. But you can also deactivate a block by editing it and setting duration=0 + needs_view=false. The difference is that you're not being recorded as a revoker if you do that. This PR records you as a revoker in this case too.

This kind of editing is only available to you if you're the block creator. The point of this PR is to relax this check later and let any moderator revoke blocks by editing, then remove the revoke action. Instead of first going to the revoke confirmation page with "Are you sure you wish to revoke this block?" and then possibly going to the edit page, moderators will be able to edit the block reason and revoke the block from the same page.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Record revokers when deactivating blocks by editing

-- File Changes --

    M app/controllers/user_blocks_controller.rb (1)
    M test/controllers/user_blocks_controller_test.rb (22)

-- Patch Links --

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

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

Message ID: <openstreetmap/openstreetmap-website/pull/5094 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240819/59d689eb/attachment.htm>


More information about the rails-dev mailing list