]> git.openstreetmap.org Git - rails.git/blobdiff - app/abilities/api_ability.rb
Replace abbreviation with for example in CONTRIBUTING md
[rails.git] / app / abilities / api_ability.rb
index e3ea9e4345a793290ff9e75293d56a5a1bdf43ef..55476ab53f72440f5871b8df3a6419c3fd83c82b 100644 (file)
@@ -15,9 +15,7 @@ class ApiAbility
       can [:read, :download], Changeset
       can :read, Tracepoint
       can :read, User
-      can :read, Node
-      can [:read, :full, :ways_for_node], Way
-      can [:read, :full, :relations_for_node, :relations_for_way, :relations_for_relation], Relation
+      can :read, [Node, Way, Relation]
       can [:history, :read], [OldNode, OldWay, OldRelation]
       can :read, UserBlock
 
@@ -38,8 +36,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, :destroy], [Node] if scope?(token, :write_api)
-          can [:create, :update, :delete], [Way, Relation] if scope?(token, :write_api)
+          can [:create, :update, :destroy], [Node, Way, Relation] if scope?(token, :write_api)
         end
 
         if user.moderator?