[openstreetmap/openstreetmap-website] Allow to edit inactive blocks (PR #5014)
Anton Khorev
notifications at github.com
Wed Jul 24 02:12:07 UTC 2024
Expired/revoked blocks have no edit links. Editing them results in "The block has already expired and cannot be edited."
This PR removes the `active?` check on update actions which allows editing inactive blocks.
## Why?
Some block are issued automatically and there are false positives among them. Any moderator can revoke erroneous blocks but it's also desirable to edit the block messages. This may be impossible for two reasons:
1. Revoked block is already expired.
2. Revoked block was created by a different moderator.
This PR removes reason 1.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/5014
-- Commit Summary --
* Allow to edit inactive blocks
* Show edit links for inactive blocks in block lists
* Show edit links for inactive blocks on block pages
-- File Changes --
M app/controllers/user_blocks_controller.rb (3)
M app/views/user_blocks/_block.html.erb (2)
M app/views/user_blocks/show.html.erb (5)
M config/locales/en.yml (1)
M test/controllers/user_blocks_controller_test.rb (96)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/5014.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5014.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5014
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5014 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240723/9f5261ee/attachment.htm>
More information about the rails-dev
mailing list