diff --git a/src/core/server/index.ts b/src/core/server/index.ts index f3edadf21895..1af8818ab0f0 100644 --- a/src/core/server/index.ts +++ b/src/core/server/index.ts @@ -354,13 +354,7 @@ export { } from './metrics'; export { AppCategory, WorkspaceAttribute } from '../types'; -export { - DEFAULT_APP_CATEGORIES, - PUBLIC_WORKSPACE_ID, - MANAGEMENT_WORKSPACE_ID, - WORKSPACE_TYPE, - PERSONAL_WORKSPACE_ID_PREFIX, -} from '../utils'; +export { DEFAULT_APP_CATEGORIES, PUBLIC_WORKSPACE_ID, WORKSPACE_TYPE } from '../utils'; export { SavedObject, diff --git a/src/core/utils/constants.ts b/src/core/utils/constants.ts index 0993f0587e28..2ea3b423a7cb 100644 --- a/src/core/utils/constants.ts +++ b/src/core/utils/constants.ts @@ -8,7 +8,3 @@ export const WORKSPACE_TYPE = 'workspace'; export const WORKSPACE_PATH_PREFIX = '/w'; export const PUBLIC_WORKSPACE_ID = 'public'; - -export const MANAGEMENT_WORKSPACE_ID = 'management'; - -export const PERSONAL_WORKSPACE_ID_PREFIX = 'personal'; diff --git a/src/core/utils/index.ts b/src/core/utils/index.ts index a4b6cd4a922b..ec7971865566 100644 --- a/src/core/utils/index.ts +++ b/src/core/utils/index.ts @@ -38,10 +38,4 @@ export { } from './context'; export { DEFAULT_APP_CATEGORIES } from './default_app_categories'; export { getWorkspaceIdFromUrl, formatUrlWithWorkspaceId, cleanWorkspaceId } from './workspace'; -export { - WORKSPACE_PATH_PREFIX, - PUBLIC_WORKSPACE_ID, - MANAGEMENT_WORKSPACE_ID, - WORKSPACE_TYPE, - PERSONAL_WORKSPACE_ID_PREFIX, -} from './constants'; +export { WORKSPACE_PATH_PREFIX, PUBLIC_WORKSPACE_ID, WORKSPACE_TYPE } from './constants'; diff --git a/src/plugins/workspace/server/integration_tests/routes.test.ts b/src/plugins/workspace/server/integration_tests/routes.test.ts index caec12ad78dc..8eeb010b4a21 100644 --- a/src/plugins/workspace/server/integration_tests/routes.test.ts +++ b/src/plugins/workspace/server/integration_tests/routes.test.ts @@ -266,8 +266,8 @@ describe('workspace service', () => { page: 1, }) .expect(200); - // Global and Management workspace will be created by default after workspace list API called. - expect(listResult.body.result.total).toEqual(4); + // Global workspace will be created by default after workspace list API called. + expect(listResult.body.result.total).toEqual(3); }); it('unable to perform operations on workspace by calling saved objects APIs', async () => { const result = await osdTestServer.request @@ -329,8 +329,8 @@ describe('workspace service', () => { }) .expect(200); expect(findResult.body.total).toEqual(0); - // Global and Management workspace will be created by default after workspace list API called. - expect(listResult.body.result.total).toEqual(3); + // Global workspace will be created by default after workspace list API called. + expect(listResult.body.result.total).toEqual(2); }); }); }); diff --git a/src/plugins/workspace/server/workspace_client.ts b/src/plugins/workspace/server/workspace_client.ts index a52b74cc6111..e7bdf97b54ec 100644 --- a/src/plugins/workspace/server/workspace_client.ts +++ b/src/plugins/workspace/server/workspace_client.ts @@ -13,7 +13,6 @@ import type { } from '../../../core/server'; import { DEFAULT_APP_CATEGORIES, - MANAGEMENT_WORKSPACE_ID, PUBLIC_WORKSPACE_ID, WORKSPACE_TYPE, Logger, @@ -106,24 +105,6 @@ export class WorkspaceClient implements IWorkspaceClientImpl { reserved: true, }); } - private async setupManagementWorkspace(savedObjectClient?: SavedObjectsClientContract) { - const DSM_APP_ID = 'dataSources'; - const DEV_TOOLS_APP_ID = 'dev_tools'; - - return this.checkAndCreateWorkspace(savedObjectClient, MANAGEMENT_WORKSPACE_ID, { - name: i18n.translate('workspaces.management.workspace.default.name', { - defaultMessage: 'Management', - }), - features: [ - `@${DEFAULT_APP_CATEGORIES.management.id}`, - WORKSPACE_OVERVIEW_APP_ID, - WORKSPACE_UPDATE_APP_ID, - DSM_APP_ID, - DEV_TOOLS_APP_ID, - ], - reserved: true, - }); - } public async setup(core: CoreSetup): Promise> { this.setupDep.savedObjects.registerType(workspace); return { @@ -197,16 +178,6 @@ export class WorkspaceClient implements IWorkspaceClientImpl { tasks.push(this.setupPublicWorkspace(scopedClientWithoutPermissionCheck)); } - /** - * Setup management workspace if management workspace can not be found - */ - const hasManagementWorkspace = savedObjects.some( - (item) => item.id === MANAGEMENT_WORKSPACE_ID - ); - if (!hasManagementWorkspace) { - tasks.push(this.setupManagementWorkspace(scopedClientWithoutPermissionCheck)); - } - try { await Promise.all(tasks); if (tasks.length) {