From 3d495932fed3c1e49a7270f02bf6881845b603c7 Mon Sep 17 00:00:00 2001 From: jacekpluta <73617938+jacekpluta@users.noreply.github.com> Date: Wed, 9 Oct 2024 08:44:27 +0200 Subject: [PATCH] [MNT-24637] ADW: Options to edit files marked as records available in Favorites Files list (#10289) --- .../services/custom-resources.service.spec.ts | 16 ++++++++++++---- .../services/custom-resources.service.ts | 2 ++ .../src/api/content-rest-api/model/favorite.ts | 2 ++ 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/lib/content-services/src/lib/document-list/services/custom-resources.service.spec.ts b/lib/content-services/src/lib/document-list/services/custom-resources.service.spec.ts index c75a80eca4..e44a47dd6c 100644 --- a/lib/content-services/src/lib/document-list/services/custom-resources.service.spec.ts +++ b/lib/content-services/src/lib/document-list/services/custom-resources.service.spec.ts @@ -46,7 +46,9 @@ describe('CustomResourcesService', () => { title: 'some-title', description: 'some-description' } - } + }, + aspectNames: ['aspect-name-1', 'aspect-name-2'], + allowableOperations: ['allowable-operation-1', 'allowable-operation-2'] }) } ] @@ -68,7 +70,9 @@ describe('CustomResourcesService', () => { properties: { 'cm:title': 'some-title', 'cm:description': 'some-description' - } + }, + aspectNames: ['aspect-name-1', 'aspect-name-2'], + allowableOperations: ['allowable-operation-1', 'allowable-operation-2'] } } as any ]); @@ -92,7 +96,9 @@ describe('CustomResourcesService', () => { title: 'some-title', description: 'some-description' } - } + }, + aspectNames: ['aspect-name-1', 'aspect-name-2'], + allowableOperations: ['allowable-operation-1', 'allowable-operation-2'] }) } ] @@ -115,7 +121,9 @@ describe('CustomResourcesService', () => { 'cm:title': 'some-title', 'cm:description': 'some-description', 'cm:property': 'some-property' - } + }, + aspectNames: ['aspect-name-1', 'aspect-name-2'], + allowableOperations: ['allowable-operation-1', 'allowable-operation-2'] } } as any ]); diff --git a/lib/content-services/src/lib/document-list/services/custom-resources.service.ts b/lib/content-services/src/lib/document-list/services/custom-resources.service.ts index 687a4c57ee..6f46e8e5da 100644 --- a/lib/content-services/src/lib/document-list/services/custom-resources.service.ts +++ b/lib/content-services/src/lib/document-list/services/custom-resources.service.ts @@ -207,6 +207,8 @@ export class CustomResourcesService { }), ...(entry.properties || {}) }; + target.aspectNames = entry?.aspectNames ?? []; + target.allowableOperations = entry?.allowableOperations ?? []; return { entry: target diff --git a/lib/js-api/src/api/content-rest-api/model/favorite.ts b/lib/js-api/src/api/content-rest-api/model/favorite.ts index c5b46482a8..65b212478f 100644 --- a/lib/js-api/src/api/content-rest-api/model/favorite.ts +++ b/lib/js-api/src/api/content-rest-api/model/favorite.ts @@ -35,6 +35,8 @@ export class Favorite { * A subset of the target favorite properties, system properties and properties already available in the target are excluded. */ properties?: any; + aspectNames?: string[]; + allowableOperations?: string[]; constructor(input?: Partial) { if (input) {