diff --git a/charts/dbildungs-iam-server/seeding/dev/01_organisation.json b/charts/dbildungs-iam-server/seeding/dev/01_organisation.json index c6bcac4b1..d594e850c 100644 --- a/charts/dbildungs-iam-server/seeding/dev/01_organisation.json +++ b/charts/dbildungs-iam-server/seeding/dev/01_organisation.json @@ -3,7 +3,7 @@ "entities": [ { "id": 0, - "name": "Wurzel Land Schleswig Holstein", + "name": "Land Schleswig-Holstein", "kuerzel": "Root", "typ": "ROOT", "administriertVon": null, @@ -11,7 +11,7 @@ }, { "id": 1, - "name": "Öffentliche Schulen Land Schleswig Holstein", + "name": "Öffentliche Schulen Land Schleswig-Holstein", "kuerzel": "Öffentl. Schulen", "typ": "LAND", "administriertVon": 0, @@ -19,7 +19,7 @@ }, { "id": 2, - "name": "Ersatzschulen Land Schleswig Holstein", + "name": "Ersatzschulen Land Schleswig-Holstein", "kuerzel": "Ersatzschulen", "typ": "LAND", "administriertVon": 0, diff --git a/seeding/dev/01/01_organisation.json b/seeding/dev/01/01_organisation.json index c6bcac4b1..d594e850c 100644 --- a/seeding/dev/01/01_organisation.json +++ b/seeding/dev/01/01_organisation.json @@ -3,7 +3,7 @@ "entities": [ { "id": 0, - "name": "Wurzel Land Schleswig Holstein", + "name": "Land Schleswig-Holstein", "kuerzel": "Root", "typ": "ROOT", "administriertVon": null, @@ -11,7 +11,7 @@ }, { "id": 1, - "name": "Öffentliche Schulen Land Schleswig Holstein", + "name": "Öffentliche Schulen Land Schleswig-Holstein", "kuerzel": "Öffentl. Schulen", "typ": "LAND", "administriertVon": 0, @@ -19,7 +19,7 @@ }, { "id": 2, - "name": "Ersatzschulen Land Schleswig Holstein", + "name": "Ersatzschulen Land Schleswig-Holstein", "kuerzel": "Ersatzschulen", "typ": "LAND", "administriertVon": 0, diff --git a/seeding/dev/01/04_rolle.json b/seeding/dev/01/04_rolle.json index eb1d89673..b7f45cc04 100644 --- a/seeding/dev/01/04_rolle.json +++ b/seeding/dev/01/04_rolle.json @@ -116,6 +116,15 @@ "MIGRATION_DURCHFUEHREN" ], "serviceProviderIds": [] + }, + { + "id": 6, + "administeredBySchulstrukturknoten": 0, + "name": "Schulbegleitung", + "rollenart": "LERN", + "merkmale": [], + "systemrechte": [], + "serviceProviderIds": [] } ] } diff --git a/seeding/seeding-integration-test/organisation/06_kuerzel-is-root.json b/seeding/seeding-integration-test/organisation/06_kuerzel-is-root.json index 6b4e62919..90f6ebc14 100644 --- a/seeding/seeding-integration-test/organisation/06_kuerzel-is-root.json +++ b/seeding/seeding-integration-test/organisation/06_kuerzel-is-root.json @@ -3,7 +3,7 @@ "entities": [ { "id": 0, - "name": "Wurzel Land Schleswig Holstein", + "name": "Land Schleswig-Holstein", "kuerzel": "Root", "typ": "ROOT", "administriertVon": null, @@ -11,5 +11,3 @@ } ] } - - diff --git a/src/modules/keycloak-administration/domain/keycloak-user.service.ts b/src/modules/keycloak-administration/domain/keycloak-user.service.ts index 3440666fe..16d58b50e 100644 --- a/src/modules/keycloak-administration/domain/keycloak-user.service.ts +++ b/src/modules/keycloak-administration/domain/keycloak-user.service.ts @@ -87,9 +87,10 @@ export class KeycloakUserService { } let algorithm: string; let hashIterations: number | undefined; + let passwordValue: string; if (hashedPassword.startsWith('{BCRYPT}')) { algorithm = 'bcrypt'; - const parts: string[] = hashedPassword.split('$'); + const parts: string[] = hashedPassword.split('$'); //Only Everything After and including the First $ if (parts.length < 4 || !parts[2]) { return { ok: false, @@ -97,6 +98,7 @@ export class KeycloakUserService { }; } hashIterations = parseInt(parts[2]); + passwordValue = hashedPassword.substring(hashedPassword.indexOf('$')); } else if (hashedPassword.startsWith('{crypt}')) { algorithm = 'crypt'; const parts: string[] = hashedPassword.split('$'); @@ -107,6 +109,7 @@ export class KeycloakUserService { }; } hashIterations = undefined; + passwordValue = hashedPassword.substring(hashedPassword.indexOf('$')); } else { return { ok: false, @@ -144,7 +147,7 @@ export class KeycloakUserService { algorithm: algorithm, }), secretData: JSON.stringify({ - value: hashedPassword, + value: passwordValue, }), type: 'password', }, diff --git a/src/modules/organisation/api/organisation.controller.spec.ts b/src/modules/organisation/api/organisation.controller.spec.ts index 9c5c88e9a..b6f50ad76 100644 --- a/src/modules/organisation/api/organisation.controller.spec.ts +++ b/src/modules/organisation/api/organisation.controller.spec.ts @@ -336,7 +336,7 @@ describe('OrganisationController', () => { faker.string.uuid(), faker.string.uuid(), faker.string.numeric(), - 'Öffentliche Schulen Land Schleswig Holstein', + 'Öffentliche Schulen Land Schleswig-Holstein', faker.lorem.word(), faker.string.uuid(), OrganisationsTyp.ROOT, @@ -349,7 +349,7 @@ describe('OrganisationController', () => { faker.string.uuid(), faker.string.uuid(), faker.string.numeric(), - 'Ersatzschulen Land Schleswig Holstein', + 'Ersatzschulen Land Schleswig-Holstein', faker.lorem.word(), faker.string.uuid(), OrganisationsTyp.SCHULE, diff --git a/src/modules/organisation/persistence/organisation.repository.integration-spec.ts b/src/modules/organisation/persistence/organisation.repository.integration-spec.ts index ab82a0708..fa0593d4f 100644 --- a/src/modules/organisation/persistence/organisation.repository.integration-spec.ts +++ b/src/modules/organisation/persistence/organisation.repository.integration-spec.ts @@ -430,7 +430,7 @@ describe('OrganisationRepository', () => { ROOT_ORGANISATION_ID, faker.string.uuid(), faker.string.numeric(), - 'Öffentliche Schulen Land Schleswig Holstein', + 'Öffentliche Schulen Land Schleswig-Holstein', faker.lorem.word(), faker.string.uuid(), OrganisationsTyp.ROOT, @@ -443,7 +443,7 @@ describe('OrganisationRepository', () => { ROOT_ORGANISATION_ID, faker.string.uuid(), faker.string.numeric(), - 'Ersatzschulen Land Schleswig Holstein', + 'Ersatzschulen Land Schleswig-Holstein', faker.lorem.word(), faker.string.uuid(), OrganisationsTyp.SCHULE,