]> git.openstreetmap.org Git - rails.git/blobdiff - app/abilities/api_ability.rb
Map 'full' to api way show action
[rails.git] / app / abilities / api_ability.rb
index 13a453eb59305e2a8b485994abd19ea66f0bbf8c..7ce3aa599ba0d8265bb18e649e9801e410833fe8 100644 (file)
@@ -16,7 +16,7 @@ class ApiAbility
       can :read, Tracepoint
       can :read, User
       can :read, Node
-      can [:read, :full, :ways_for_node], Way
+      can [:read, :ways_for_node], Way
       can [:read, :full, :relations_for_node, :relations_for_way, :relations_for_relation], Relation
       can [:history, :read], [OldNode, OldWay, OldRelation]
       can :read, UserBlock
@@ -38,7 +38,7 @@ class ApiAbility
         if user.terms_agreed?
           can [:create, :update, :upload, :close, :subscribe, :unsubscribe], Changeset if scope?(token, :write_api)
           can :create, ChangesetComment if scope?(token, :write_api)
-          can [:create, :update, :delete], [Node, Way, Relation] if scope?(token, :write_api)
+          can [:create, :update, :destroy], [Node, Way, Relation] if scope?(token, :write_api)
         end
 
         if user.moderator?