[BREAKING_CHANGE] Deprecate remaining entities standardId (#17639)

# Introduction
Following https://github.com/twentyhq/twenty/pull/17632 and
https://github.com/twentyhq/twenty/pull/17572
This PR deprecates the agent, skill, field metadata and role
`standardId` in favor of the `universalIdentifier` usage

## Note
- Removed previous standard ids declaration modules
- Twenty-sdk now re-exports the `STANDARD_OBJECTS` universalIdentifier
hashmap constant
- deleted some sync-metadata deadcode too ( mainly types )
This commit is contained in:
Paul Rastoin
2026-02-03 09:06:24 +01:00
committed by GitHub
parent cfdcc0065c
commit d35d5c0463
118 changed files with 534 additions and 2279 deletions
@@ -12,11 +12,11 @@ import {
} from 'src/engine/metadata-modules/permissions/permissions.exception';
import { RoleTargetEntity } from 'src/engine/metadata-modules/role-target/role-target.entity';
import { RoleTargetService } from 'src/engine/metadata-modules/role-target/services/role-target.service';
import { ADMIN_ROLE } from 'src/engine/metadata-modules/role/constants/admin-role';
import { RoleEntity } from 'src/engine/metadata-modules/role/role.entity';
import { GlobalWorkspaceOrmManager } from 'src/engine/twenty-orm/global-workspace-datasource/global-workspace-orm.manager';
import { buildSystemAuthContext } from 'src/engine/twenty-orm/utils/build-system-auth-context.util';
import { WorkspaceCacheService } from 'src/engine/workspace-cache/services/workspace-cache.service';
import { STANDARD_ROLE } from 'src/engine/workspace-manager/twenty-standard-application/constants/standard-role.constant';
import { WorkspaceMemberWorkspaceEntity } from 'src/modules/workspace-member/standard-objects/workspace-member.workspace-entity';
export class UserRoleService {
@@ -212,7 +212,8 @@ export class UserRoleService {
if (
isDefined(roleOfUserWorkspace) &&
roleOfUserWorkspace.standardId === ADMIN_ROLE.standardId
roleOfUserWorkspace.universalIdentifier ===
STANDARD_ROLE.admin.universalIdentifier
) {
const adminRole = roleOfUserWorkspace;
@@ -273,7 +274,8 @@ export class UserRoleService {
if (
isDefined(currentRole) &&
currentRole.standardId === ADMIN_ROLE.standardId
currentRole.universalIdentifier ===
STANDARD_ROLE.admin.universalIdentifier
) {
adminRoleIdToValidate = currentRole.id;
}