From 18ccb0fd27f179a59782cbbe9abde4c2e99d27d3 Mon Sep 17 00:00:00 2001 From: adrinr Date: Wed, 29 Mar 2023 10:41:37 +0100 Subject: [PATCH] Add and map display name in scim --- packages/types/src/api/web/global/scim/users.ts | 2 ++ packages/types/src/documents/global/user.ts | 3 ++- packages/worker/src/api/routes/global/tests/scim.spec.ts | 5 ----- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/types/src/api/web/global/scim/users.ts b/packages/types/src/api/web/global/scim/users.ts index 5dddee1f14..1b3b05d2ee 100644 --- a/packages/types/src/api/web/global/scim/users.ts +++ b/packages/types/src/api/web/global/scim/users.ts @@ -11,6 +11,7 @@ export interface ScimUserResponse extends ScimResource { resourceType: "User" } userName: string + displayName?: string name: { formatted: string familyName: string @@ -44,6 +45,7 @@ export interface ScimCreateUserRequest { meta: { resourceType: "User" } + displayName?: string name: { formatted: string familyName: string diff --git a/packages/types/src/documents/global/user.ts b/packages/types/src/documents/global/user.ts index 56edab7012..cd59482f26 100644 --- a/packages/types/src/documents/global/user.ts +++ b/packages/types/src/documents/global/user.ts @@ -54,9 +54,10 @@ export interface User extends Document { userGroups?: string[] onboardedAt?: string scimInfo?: { + isSync: boolean userName: string externalId: string - isSync: boolean + displayName?: string } } diff --git a/packages/worker/src/api/routes/global/tests/scim.spec.ts b/packages/worker/src/api/routes/global/tests/scim.spec.ts index 1e88fdd39b..1fe4c0450e 100644 --- a/packages/worker/src/api/routes/global/tests/scim.spec.ts +++ b/packages/worker/src/api/routes/global/tests/scim.spec.ts @@ -395,11 +395,6 @@ describe("scim", () => { const body: ScimUpdateRequest = { schemas: ["urn:ietf:params:scim:api:messages:2.0:PatchOp"], Operations: [ - { - op: "Add", - path: "displayName", - value: structures.generator.name(), - }, { op: "Add", path: "preferredLanguage",