[openstreetmap/openstreetmap-website] Add a CanCanCan ability to see redacted versions (PR #4553)
mmd
notifications at github.com
Sat Jul 6 15:38:20 UTC 2024
@mmd-osm commented on this pull request.
> @@ -54,6 +54,7 @@ def initialize(user)
can [:index, :create, :destroy], UserMute
if user.moderator?
+ can :show_redactions, [Node, Way, Relation, OldNode, OldWay, OldRelation]
"Node" (as in app/models/node.rb) does not have a redaction_id and does not belong to a redaction (unlike app/models/old_node.rb).
Also, "Node" has no concept of "some versions", it's always the latest version of an object only, which by definition cannot be redacted. Only the "Old*" object have the full element history, including the latest version.
So maybe I'm a bit confused here, because my definition of Node and OldNode is based on the model definitions.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4553#discussion_r1667383647
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4553/review/2161546013 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240706/26aee5cf/attachment.htm>
More information about the rails-dev
mailing list