Make api show/update/destroy relation actions resourceful

This commit is contained in:
Anton Khorev 2025-02-01 14:31:03 +03:00
parent 35fc840b41
commit 18f65b78eb
4 changed files with 10 additions and 13 deletions

View file

@ -38,8 +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, :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?