[openstreetmap/openstreetmap-website] Allow users to delete their own diary entries (PR #4540)

Andy Allan notifications at github.com
Wed May 22 16:15:19 UTC 2024


@gravitystorm commented on this pull request.



> @@ -33,12 +33,12 @@
         </li>
       <% end %>
 
-      <% if can? :hide, DiaryEntry %>
+      <% if current_user && (current_user == diary_entry.user || current_user.moderator?) %>

perhaps also `|| current_user.administrator?` here?

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

Message ID: <openstreetmap/openstreetmap-website/pull/4540/review/2071746441 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240522/8e7698fb/attachment.htm>


More information about the rails-dev mailing list