X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/3b0be171b9193c9939252f3e60a685dd1aa0af13..debacb393ff35a1e7eefc84b8ad72d9feee19e1f:/app/abilities/api_ability.rb diff --git a/app/abilities/api_ability.rb b/app/abilities/api_ability.rb index e3ea9e434..e774f6820 100644 --- a/app/abilities/api_ability.rb +++ b/app/abilities/api_ability.rb @@ -15,10 +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 [:history, :read], [OldNode, OldWay, OldRelation] + can :read, [Node, Way, Relation, OldNode, OldWay, OldRelation] can :read, UserBlock if user&.active? @@ -38,8 +35,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?