[openstreetmap/openstreetmap-website] Show deleted diaries and diary comments to admins (#2248)

Andy Allan notifications at github.com
Wed Jun 5 14:06:56 UTC 2019


In https://github.com/openstreetmap/openstreetmap-website/pull/2226 @tomhuges wrote:

> I do really need an easy way to be able to see the user's diary posts or comments with deleted entries included. 

So here we go! This PR shows deleted diary entries to administrators, so long as the user hasn't also been deleted. It also shows deleted diary comments to administrators. It shows these deleted things deemphasized, and allows admins to restore them if desired.

There's a small difference in functionality between entries and comments, because comments are always shown (i.e. not filtered by user status). However, that was more complexity and we're already getting into some deep hypothetical weeds here.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Allow administrators to unhide diary entries, if they wish
  * Show deleted diary entries to administrators, if the user isn't also deleted
  * Allow admins to unhide diary comments, if they wish
  * Show all diary comments to administrators

-- File Changes --

    M app/abilities/ability.rb (2)
    M app/controllers/diary_entries_controller.rb (16)
    M app/views/diary_entries/_diary_comment.html.erb (8)
    M app/views/diary_entries/_diary_entry.html.erb (8)
    M app/views/diary_entries/show.html.erb (2)
    M config/locales/en.yml (2)
    M config/routes.rb (2)
    M test/controllers/diary_entries_controller_test.rb (59)
    M test/system/diary_entry_test.rb (46)

-- Patch Links --

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

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/2248
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20190605/ebb31180/attachment.html>


More information about the rails-dev mailing list