Skip to content

Commit

Permalink
feat: update
Browse files Browse the repository at this point in the history
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
  • Loading branch information
SuZhou-Joe committed Aug 9, 2023
1 parent aef990d commit 83f1648
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/core/server/workspaces/workspaces_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
import { URL } from 'node:url';
import { i18n } from '@osd/i18n';
import { CoreService } from '../../types';
import { CoreContext } from '../core_context';
import { InternalHttpServiceSetup } from '../http';
Expand Down Expand Up @@ -103,7 +104,7 @@ export class WorkspacesService
private async checkAndCreateWorkspace(
internalRepository: ISavedObjectsRepository,
workspaceId: string,
workspaceAttribute: Omit<WorkspaceAttribute, 'id'>,
workspaceAttribute: Omit<WorkspaceAttribute, 'id' | 'permissions'>,
permissions?: Permissions
) {
/**
Expand Down Expand Up @@ -150,15 +151,19 @@ export class WorkspacesService
internalRepository,
PUBLIC_WORKSPACE,
{
name: 'public',
name: i18n.translate('workspaces.public.workspace.default.name', {
defaultMessage: 'public',
}),
},
publicWorkspaceACL.getPermissions()
),
this.checkAndCreateWorkspace(
internalRepository,
MANAGEMENT_WORKSPACE,
{
name: 'Management',
name: i18n.translate('workspaces.management.workspace.default.name', {
defaultMessage: 'Management',
}),
},
managementWorkspaceACL.getPermissions()
),
Expand Down

0 comments on commit 83f1648

Please sign in to comment.