From 4382986ca1a0e09e8d7ddcde139d85cd37024984 Mon Sep 17 00:00:00 2001 From: Alexander Date: Fri, 8 Dec 2023 10:38:41 +0100 Subject: [PATCH] Allow getWorkbook for mirrored entries --- src/services/new/workbook/get-workbook.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/services/new/workbook/get-workbook.ts b/src/services/new/workbook/get-workbook.ts index 23ec62cd..bd0846bd 100644 --- a/src/services/new/workbook/get-workbook.ts +++ b/src/services/new/workbook/get-workbook.ts @@ -44,7 +44,7 @@ export const getWorkbook = async validateArgs(args); } - const {tenantId, projectId, isPrivateRoute} = ctx.get('info'); + const {tenantId, projectId, isPrivateRoute, onlyMirrored} = ctx.get('info'); const {accessServiceEnabled} = ctx.config; @@ -55,7 +55,7 @@ export const getWorkbook = async .where({ [WorkbookModelColumn.DeletedAt]: null, [WorkbookModelColumn.WorkbookId]: workbookId, - ...(isPrivateRoute + ...(isPrivateRoute || onlyMirrored ? {} : { [WorkbookModelColumn.TenantId]: tenantId, @@ -78,7 +78,7 @@ export const getWorkbook = async model, }); - if (accessServiceEnabled && !skipCheckPermissions && !isPrivateRoute) { + if (accessServiceEnabled && !skipCheckPermissions && !isPrivateRoute && !onlyMirrored) { let parentIds: string[] = []; if (workbook.model.collectionId !== null) {