(backend) add API endpoint to create children for a document

We add a POST method to the existing children endpoint.
This commit is contained in:
Samuel Paccoud - DINUM
2024-12-18 08:44:12 +01:00
committed by Anthony LC
parent 7ff4bc457f
commit 1d0386d9b5
6 changed files with 310 additions and 18 deletions

View File

@@ -584,7 +584,8 @@ class Document(MP_Node, BaseModel):
"ai_transform": can_update,
"ai_translate": can_update,
"attachment_upload": can_update,
"children": can_get,
"children_list": can_get,
"children_create": can_update and user.is_authenticated,
"collaboration_auth": can_get,
"destroy": RoleChoices.OWNER in roles,
"favorite": can_get and user.is_authenticated,