X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/35fc840b41d1257fe3560af777c291a2852ac749..debacb393ff35a1e7eefc84b8ad72d9feee19e1f:/app/abilities/api_ability.rb diff --git a/app/abilities/api_ability.rb b/app/abilities/api_ability.rb index bca6b779b..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, Way] if scope?(token, :write_api) - can [:create, :update, :delete], [Relation] if scope?(token, :write_api) + can [:create, :update, :destroy], [Node, Way, Relation] if scope?(token, :write_api) end if user.moderator?