Make api show/update/destroy node actions resourceful
This commit is contained in:
parent
7cf9bf0e55
commit
3b0be171b9
4 changed files with 11 additions and 12 deletions
|
@ -38,7 +38,8 @@ 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] if scope?(token, :write_api)
|
||||
can [:create, :update, :delete], [Way, Relation] if scope?(token, :write_api)
|
||||
end
|
||||
|
||||
if user.moderator?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue