Fix graphql conflict between role custom object and role dto (#10479)

## Context
Following the strategy where we want to block custom object creation
when the type is reserved by core objects. The issue happened again with
the recently introduced role table.
This commit is contained in:
Weiko
2025-02-25 15:46:06 +01:00
committed by GitHub
parent 89e11b4626
commit 589a0c7b2d

View File

@ -12,18 +12,41 @@ import { validateMetadataNameValidityOrThrow } from 'src/engine/metadata-modules
import { camelCase } from 'src/utils/camel-case';
const coreObjectNames = [
'approvedAccessDomain',
'approvedAccessDomains',
'appToken',
'appTokens',
'billingCustomer',
'billingCustomers',
'billingEntitlement',
'billingEntitlements',
'billingMeter',
'billingMeters',
'billingProduct',
'billingProducts',
'billingSubscription',
'billingSubscriptions',
'billingSubscriptionItem',
'billingSubscriptionItems',
'featureFlag',
'featureFlags',
'keyValuePair',
'keyValuePairs',
'postgresCredential',
'postgresCredentials',
'twoFactorMethod',
'twoFactorMethods',
'user',
'users',
'userWorkspace',
'userWorkspaces',
'workspace',
'workspaces',
'role',
'roles',
'userWorkspaceRole',
'userWorkspaceRoles',
];
const reservedKeywords = [