]> git.openstreetmap.org Git - rails.git/blobdiff - app/abilities/api_ability.rb
Merge pull request #5677 from tomhughes/user-list-enhancements
[rails.git] / app / abilities / api_ability.rb
index 7bbd9889ad53fbbb6d064b115f79eca7a54cad75..ec4de8f8e03b99dc795f88cecf6421aefb11c00e 100644 (file)
@@ -43,7 +43,9 @@ class ApiAbility
 
           can :destroy, Note if scopes.include?("write_notes")
 
-          can :redact, [OldNode, OldWay, OldRelation] if user&.terms_agreed? && scopes.include?("write_redactions")
+          can :redact, [OldNode, OldWay, OldRelation] if user.terms_agreed? && scopes.include?("write_redactions")
+
+          can :create, UserBlock if scopes.include?("write_blocks")
         end
       end
     end