]> git.openstreetmap.org Git - rails.git/blobdiff - app/abilities/api_capability.rb
Remove hidden comments test from controller tests
[rails.git] / app / abilities / api_capability.rb
index 8c52327cfe488cc0d4e0710d85c48625dd7a166d..95d7ab9ab92d2145b90f11373a69416aacc9f959 100644 (file)
@@ -32,9 +32,9 @@ class ApiCapability
           can [:destroy, :restore], ChangesetComment if scope?(token, :write_api)
           can :destroy, Note if scope?(token, :write_notes)
           if user&.terms_agreed?
-            can :redact, OldNode if scope?(token, :write_api)
-            can :redact, OldWay if scope?(token, :write_api)
-            can :redact, OldRelation if scope?(token, :write_api)
+            can :redact, OldNode if scope?(token, :write_api) || scope?(token, :write_redactions)
+            can :redact, OldWay if scope?(token, :write_api) || scope?(token, :write_redactions)
+            can :redact, OldRelation if scope?(token, :write_api) || scope?(token, :write_redactions)
           end
         end
       end