✨(backend) add API endpoint to move a document in the document tree
Only administrators or owners of a document can move it to a target document for which they are also administrator or owner. We allow different moving modes: - first-child: move the document as the first child of the target - last-child: move the document as the last child of the target - first-sibling: move the document as the first sibling of the target - last-sibling: move the document as the last sibling of the target - left: move the document as sibling ordered just before the target - right: move the document as sibling ordered just after the target The whole subtree below the document that is being moved, moves as well and remains below the document after it is moved.
This commit is contained in:
committed by
Anthony LC
parent
2e8a399668
commit
4de03d292a
@@ -592,6 +592,7 @@ class Document(MP_Node, BaseModel):
|
||||
"favorite": can_get and user.is_authenticated,
|
||||
"link_configuration": is_owner_or_admin,
|
||||
"invite_owner": RoleChoices.OWNER in roles,
|
||||
"move": is_owner_or_admin,
|
||||
"partial_update": can_update,
|
||||
"retrieve": can_get,
|
||||
"media_auth": can_get,
|
||||
|
||||
Reference in New Issue
Block a user