From 017a4d3aa060bb761271bd763909a1de317dc61e Mon Sep 17 00:00:00 2001 From: Moctar Date: Fri, 22 May 2026 16:46:07 +0200 Subject: [PATCH] PS-1145_databox indexer : fix missing rendition policy editable parameter --- databox/indexer/src/handlers/phraseanet/StructureImporter.ts | 5 +++++ databox/indexer/src/handlers/phraseanet/types.d.ts | 1 + 2 files changed, 6 insertions(+) diff --git a/databox/indexer/src/handlers/phraseanet/StructureImporter.ts b/databox/indexer/src/handlers/phraseanet/StructureImporter.ts index f26353473c..188e653355 100644 --- a/databox/indexer/src/handlers/phraseanet/StructureImporter.ts +++ b/databox/indexer/src/handlers/phraseanet/StructureImporter.ts @@ -71,6 +71,7 @@ export async function addMissingRenditionsConf( if (!dm.renditions[sd.name]) { dm.renditions[sd.name] = { policy: sd.class, + policyAssetEditable: false, buildMode: RenditionBuildMode.BUILD_FROM_PARENT, parent: 'main', useAsPreview: sd.name === 'preview' ? true : undefined, @@ -181,6 +182,7 @@ export async function importSubdefsStructure( useAsAnimatedThumbnail: boolean; types: Record; policy: string | null; + policyAssetEditable: boolean | false; labels: Record; } > = {}; @@ -213,6 +215,7 @@ export async function importSubdefsStructure( rendition.useAsAnimatedThumbnail ?? false, types: {} as Record, policy: rendition['policy'] ?? null, + policyAssetEditable: rendition['policyAssetEditable'] ?? false, labels: {}, }; } @@ -251,6 +254,7 @@ export async function importSubdefsStructure( subdefToRendition[settings['from']].push(name); sdByName[name].types[sd.type] = sd; sdByName[name].labels = sd.labels; // todo: check conflicts + sdByName[name].policyAssetEditable = rendition.policyAssetEditable ?? false; if (!rendition.policy) { // use phrnet class if (sdByName[name].policy === null) { @@ -289,6 +293,7 @@ export async function importSubdefsStructure( name: sd.policy, workspace: `/workspaces/${workspaceId}`, public: true, + editable: sd.policyAssetEditable, }); } diff --git a/databox/indexer/src/handlers/phraseanet/types.d.ts b/databox/indexer/src/handlers/phraseanet/types.d.ts index 66b302bafe..6c14c5e15e 100644 --- a/databox/indexer/src/handlers/phraseanet/types.d.ts +++ b/databox/indexer/src/handlers/phraseanet/types.d.ts @@ -32,6 +32,7 @@ export type ConfigPhraseanetSubdef = { useAsAnimatedThumbnail?: boolean; buildMode?: number; policy?: string; + policyAssetEditable?: boolean; parent?: string | null; builders: Record; };