diff --git a/src/plugins/workspace/server/saved_objects/workspace_ui_settings_client_wrapper.ts b/src/plugins/workspace/server/saved_objects/workspace_ui_settings_client_wrapper.ts index b1f86407c34..4199d01edb9 100644 --- a/src/plugins/workspace/server/saved_objects/workspace_ui_settings_client_wrapper.ts +++ b/src/plugins/workspace/server/saved_objects/workspace_ui_settings_client_wrapper.ts @@ -15,8 +15,9 @@ import { WorkspaceAttribute, OpenSearchDashboardsRequest, SavedObjectsClientContract, + CURRENT_USER_PLACEHOLDER, } from '../../../../core/server'; -import { DEFAULT_WORKSPACE, WORKSPACE_UI_SETTINGS_CLIENT_WRAPPER_ID } from '../../common/constants'; +import { WORKSPACE_UI_SETTINGS_CLIENT_WRAPPER_ID } from '../../common/constants'; import { Logger } from '../../../../core/server'; import { DEFAULT_DATA_SOURCE_UI_SETTINGS_ID } from '../../../data_source_management/common'; @@ -101,9 +102,9 @@ export class WorkspaceUiSettingsClientWrapper { /** * When updating ui settings within a workspace, it will update the workspace ui settings, * the global ui settings will remain unchanged. - * When updating default workspace, it will update user level settings. + * Allow user to update user level settings. */ - if (type === 'config' && requestWorkspaceId && !(DEFAULT_WORKSPACE in attributes)) { + if (type === 'config' && requestWorkspaceId && !id.startsWith(CURRENT_USER_PLACEHOLDER)) { const configObject = await wrapperOptions.client.get>( 'config', id,