(backend) add computed link reach and role to document API

On a document, we need to display the status of the link (reach and
role) taking into account the ancestors link reach/role as well as
the current document.
This commit is contained in:
Samuel Paccoud - DINUM
2025-04-28 21:43:59 +02:00
committed by Anthony LC
parent 1c34305393
commit c1fc1bd52f
10 changed files with 208 additions and 4 deletions

View File

@@ -181,6 +181,8 @@ class ListDocumentSerializer(serializers.ModelSerializer):
"abilities",
"ancestors_link_reach",
"ancestors_link_role",
"computed_link_reach",
"computed_link_role",
"created_at",
"creator",
"depth",
@@ -201,6 +203,8 @@ class ListDocumentSerializer(serializers.ModelSerializer):
"abilities",
"ancestors_link_reach",
"ancestors_link_role",
"computed_link_reach",
"computed_link_role",
"created_at",
"creator",
"depth",
@@ -258,6 +262,8 @@ class DocumentSerializer(ListDocumentSerializer):
"abilities",
"ancestors_link_reach",
"ancestors_link_role",
"computed_link_reach",
"computed_link_role",
"content",
"created_at",
"creator",
@@ -280,6 +286,8 @@ class DocumentSerializer(ListDocumentSerializer):
"abilities",
"ancestors_link_reach",
"ancestors_link_role",
"computed_link_reach",
"computed_link_role",
"created_at",
"creator",
"depth",