Skip to content

Commit 30fd8f5

Browse files
committed
Move globalTenantName to common
Signed-off-by: Chang Liu <[email protected]>
1 parent 0e1178b commit 30fd8f5

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

common/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export const PRIVATE_TENANT_SYMBOL = '__user__';
4747
export const DEFAULT_TENANT = 'default';
4848
export const GLOBAL_TENANT_RENDERING_TEXT = 'Global';
4949
export const PRIVATE_TENANT_RENDERING_TEXT = 'Private';
50+
export const globalTenantName = 'global_tenant';
5051

5152
export enum AuthType {
5253
BASIC = 'basicauth',

public/apps/configuration/utils/tenant-utils.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,12 @@ import { getResourceUrl } from './resource-utils';
4040
import {
4141
GLOBAL_TENANT_RENDERING_TEXT,
4242
GLOBAL_TENANT_SYMBOL,
43+
globalTenantName,
4344
isGlobalTenant,
4445
isRenderingPrivateTenant,
4546
PRIVATE_TENANT_RENDERING_TEXT,
4647
} from '../../../../common';
4748

48-
export const globalTenantName = 'global_tenant';
49-
5049
export const GLOBAL_USER_DICT: { [key: string]: string } = {
5150
Label: 'Global',
5251
Value: GLOBAL_TENANT_SYMBOL,

public/apps/configuration/utils/test/tenant-utils.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import {
2020
resolveTenantName,
2121
RESOLVED_GLOBAL_TENANT,
2222
RESOLVED_PRIVATE_TENANT,
23-
globalTenantName,
2423
formatTenantName,
2524
transformRoleTenantPermissionData,
2625
getTenantPermissionType,
@@ -32,6 +31,7 @@ import {
3231
TENANT_WRITE_PERMISSION,
3332
} from '../../constants';
3433
import { TenantPermissionType } from '../../types';
34+
import { globalTenantName } from '../../../../../common';
3535

3636
describe('Tenant list utils', () => {
3737
const expectedGlobalTenantListing = {

server/saved_objects/saved_objects_wrapper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ import {
3636
} from 'opensearch-dashboards/server';
3737
import { Config } from 'packages/osd-config/target';
3838
import { SecurityPluginConfigType } from '..';
39-
import { globalTenantName } from '../../public/apps/configuration/utils/tenant-utils';
4039
import { OpenSearchDashboardsAuthState } from '../auth/types/authentication_type';
4140
import {
4241
DEFAULT_TENANT,
4342
GLOBAL_TENANT_SYMBOL,
43+
globalTenantName,
4444
isPrivateTenant,
4545
PRIVATE_TENANT_SYMBOL,
4646
} from '../../common';

0 commit comments

Comments
 (0)