(back) new endpoint document can_edit

The endpoint can_edit is added to the DocumentViewset, it will give the
information to the frontend application id the current user can edit the
Docs based on the no-websocket rules.
This commit is contained in:
Manuel Raynaud
2025-06-26 07:17:00 +02:00
parent 651f2d1d75
commit 118804e810
7 changed files with 289 additions and 32 deletions

View File

@@ -67,5 +67,5 @@ class CollaborationService:
f"Failed to get document connection info. Status code: {response.status_code}, "
f"Response: {response.text}"
)
return response.json()
result = response.json()
return result.get("count", 0), result.get("exists", False)