From 99356f43e098e650041d283b8aa6dccfbd54e31d Mon Sep 17 00:00:00 2001 From: SuZhou-Joe Date: Fri, 4 Aug 2023 16:10:42 +0800 Subject: [PATCH] feat: add public Signed-off-by: SuZhou-Joe --- .../saved_objects/workspace_saved_objects_client_wrapper.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/server/workspaces/saved_objects/workspace_saved_objects_client_wrapper.ts b/src/core/server/workspaces/saved_objects/workspace_saved_objects_client_wrapper.ts index f53052b222b5..0a028b7e356e 100644 --- a/src/core/server/workspaces/saved_objects/workspace_saved_objects_client_wrapper.ts +++ b/src/core/server/workspaces/saved_objects/workspace_saved_objects_client_wrapper.ts @@ -214,7 +214,8 @@ export class WorkspaceSavedObjectsClientWrapper { ); if (options.workspaces) { const isEveryWorkspaceIsPermitted = options.workspaces.every((item) => - permittedWorkspaceIds?.includes(item) + // TODO modify this line to use permittedWorkspaceIds if public workspace is also a workspace + ['public', ...(permittedWorkspaceIds || [])]?.includes(item) ); if (!isEveryWorkspaceIsPermitted) { throw generateWorkspacePermissionError();