From 4607e09bb249b77b8e73c9ab5d9e0524915acfac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marvin=20=C3=96hlerking?= Date: Tue, 28 Nov 2023 14:34:09 +0100 Subject: [PATCH] fix --- .../strategy/oidc/service/oidc-provisioning.service.spec.ts | 4 ++-- .../strategy/oidc/service/oidc-provisioning.service.ts | 2 +- .../provisioning/strategy/sanis/sanis.strategy.spec.ts | 6 ++++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/apps/server/src/modules/provisioning/strategy/oidc/service/oidc-provisioning.service.spec.ts b/apps/server/src/modules/provisioning/strategy/oidc/service/oidc-provisioning.service.spec.ts index 7e03caa3422..355a01f11b3 100644 --- a/apps/server/src/modules/provisioning/strategy/oidc/service/oidc-provisioning.service.spec.ts +++ b/apps/server/src/modules/provisioning/strategy/oidc/service/oidc-provisioning.service.spec.ts @@ -487,7 +487,7 @@ describe('OidcProvisioningService', () => { externalId: 'externalId', name: 'existingName', officialSchoolNumber: 'existingOfficialSchoolNumber', - systems: [], + systems: undefined, features: [SchoolFeatures.OAUTH_PROVISIONING_ENABLED], }); @@ -882,7 +882,7 @@ describe('OidcProvisioningService', () => { }); }); - describe('when provisioning an existing group with no other group members', () => { + describe('when provisioning an existing group with empty other group members', () => { const setup = () => { const student: UserDO = userDoFactory .withRoles([{ id: new ObjectId().toHexString(), name: RoleName.STUDENT }]) diff --git a/apps/server/src/modules/provisioning/strategy/oidc/service/oidc-provisioning.service.ts b/apps/server/src/modules/provisioning/strategy/oidc/service/oidc-provisioning.service.ts index 36335353a18..4e934a4fd9a 100644 --- a/apps/server/src/modules/provisioning/strategy/oidc/service/oidc-provisioning.service.ts +++ b/apps/server/src/modules/provisioning/strategy/oidc/service/oidc-provisioning.service.ts @@ -186,7 +186,7 @@ export class OidcProvisioningService { } private async getFilteredGroupUsers(externalGroup: ExternalGroupDto, systemId: string): Promise { - if (!externalGroup.otherUsers) { + if (!externalGroup.otherUsers?.length) { return []; } diff --git a/apps/server/src/modules/provisioning/strategy/sanis/sanis.strategy.spec.ts b/apps/server/src/modules/provisioning/strategy/sanis/sanis.strategy.spec.ts index 9fd8083e374..814f2d7e23a 100644 --- a/apps/server/src/modules/provisioning/strategy/sanis/sanis.strategy.spec.ts +++ b/apps/server/src/modules/provisioning/strategy/sanis/sanis.strategy.spec.ts @@ -90,6 +90,9 @@ describe('SanisStrategy', () => { vorname: 'Hans', familienname: 'Peter', }, + geburt: { + datum: '2023-11-17', + }, }, personenkontexte: [ { @@ -99,6 +102,9 @@ describe('SanisStrategy', () => { id: new UUID('df66c8e6-cfac-40f7-b35b-0da5d8ee680e').toString(), name: 'schoolName', kennung: 'Kennung', + anschrift: { + ort: 'Hannover', + }, }, gruppen: [ {