[openstreetmap/openstreetmap-website] Edit unrevoked block (PR #5104)

Tom Hughes notifications at github.com
Wed Aug 21 17:43:24 UTC 2024


@tomhughes commented on this pull request.

Why exactly do we want to stop other moderators editing unless they also revoke?

> @@ -60,7 +60,10 @@ def initialize(user)
           can [:index, :show, :resolve, :ignore, :reopen], Issue
           can :create, IssueComment
           can [:new, :create, :edit, :update, :destroy], Redaction
-          can [:new, :edit, :create, :update, :revoke, :revoke_all], UserBlock
+          can [:new, :create, :revoke, :revoke_all], UserBlock
+          can :update, UserBlock, :creator => user
+          can :update, UserBlock, :revoker => user
+          can :update, UserBlock, :active? => true

Does this act as an AND or an OR of the conditions? Because neither seems right? Surely we want active AND (creator OR revoker) as the test?

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

Message ID: <openstreetmap/openstreetmap-website/pull/5104/review/2251492848 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240821/52eacef6/attachment.htm>


More information about the rails-dev mailing list