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

Anton Khorev notifications at github.com
Wed Feb 28 14:06:10 UTC 2024


@AntonKhorev commented on this pull request.



> @@ -43,7 +43,7 @@ def initialize(user)
         can [:new, :show, :create, :destroy], :oauth2_authorization
         can [:edit, :update, :destroy], :account
         can [:show], :dashboard
-        can [:new, :create, :edit, :update, :comment, :subscribe, :unsubscribe], DiaryEntry
+        can [:new, :create, :edit, :update, :comment, :subscribe, :unsubscribe, :hide, :unhide], DiaryEntry

Is there a way to check the user here like this?

    can [:hide, :unhide], DiaryEntry, :user => user

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

Message ID: <openstreetmap/openstreetmap-website/pull/4540/review/1906359172 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240228/64beb439/attachment-0001.htm>


More information about the rails-dev mailing list