diff --git a/apps/services/auth/admin-api/src/app/v2/clients/test/me-clients.spec.ts b/apps/services/auth/admin-api/src/app/v2/clients/test/me-clients.spec.ts index 58235d12f2b1..3e73048f6aca 100644 --- a/apps/services/auth/admin-api/src/app/v2/clients/test/me-clients.spec.ts +++ b/apps/services/auth/admin-api/src/app/v2/clients/test/me-clients.spec.ts @@ -431,23 +431,26 @@ describe('MeClientsController with auth', () => { slidingRefreshTokenLifetime: typeSpecificDefaults.slidingRefreshTokenLifetime ?? clientBaseAttributes.slidingRefreshTokenLifetime, - accessTokenLifetime: clientBaseAttributes.accessTokenLifetime, + accessTokenLifetime: + typeSpecificDefaults.accessTokenLifetime ?? + clientBaseAttributes.accessTokenLifetime, allowOfflineAccess: clientBaseAttributes.allowOfflineAccess, redirectUris: [], postLogoutRedirectUris: [], requireApiScopes: false, requireConsent: false, - requirePkce: true, - supportTokenExchange: false, + requirePkce: + typeSpecificDefaults.requirePkce ?? clientBaseAttributes.requirePkce, + supportTokenExchange: typeSpecificDefaults.supportTokenExchange, supportsCustomDelegation: false, supportsLegalGuardians: false, supportsPersonalRepresentatives: false, supportsProcuringHolders: false, promptDelegations: false, - customClaims: [], + customClaims: typeSpecificDefaults.customClaims ?? [], singleSession: false, supportedDelegationTypes: [], - allowedAcr: [defaultAcrValue], + allowedAcr: typeSpecificDefaults.allowedAcr ?? [defaultAcrValue], }) // Assert - db record @@ -468,9 +471,14 @@ describe('MeClientsController with auth', () => { absoluteRefreshTokenLifetime: typeSpecificDefaults.absoluteRefreshTokenLifetime ?? clientBaseAttributes.absoluteRefreshTokenLifetime, - accessTokenLifetime: clientBaseAttributes.accessTokenLifetime, - allowOfflineAccess: clientBaseAttributes.allowOfflineAccess, - requirePkce: clientBaseAttributes.requirePkce, + accessTokenLifetime: + typeSpecificDefaults.accessTokenLifetime ?? + clientBaseAttributes.accessTokenLifetime, + allowOfflineAccess: + typeSpecificDefaults.allowOfflineAccess ?? + clientBaseAttributes.allowOfflineAccess, + requirePkce: + typeSpecificDefaults.requirePkce ?? clientBaseAttributes.requirePkce, refreshTokenExpiration: translateRefreshTokenExpiration( typeSpecificDefaults.refreshTokenExpiration, ), diff --git a/libs/application/templates/aosh/register-new-machine/src/lib/dataSchema.ts b/libs/application/templates/aosh/register-new-machine/src/lib/dataSchema.ts index 12432ed6ecf9..c921799ac33b 100644 --- a/libs/application/templates/aosh/register-new-machine/src/lib/dataSchema.ts +++ b/libs/application/templates/aosh/register-new-machine/src/lib/dataSchema.ts @@ -252,7 +252,7 @@ export const NewMachineAnswersSchema = z.object({ streetRegistration: z .object({ registerToTraffic: z.enum([YES, NO]), - size: z.enum(['1', '2', '3']), + size: z.enum(['1', '2', '3']).optional(), }) .optional(), }), diff --git a/libs/auth-api-lib/src/lib/clients/admin/admin-clients.service.ts b/libs/auth-api-lib/src/lib/clients/admin/admin-clients.service.ts index f919f1611294..474cf26dbee2 100644 --- a/libs/auth-api-lib/src/lib/clients/admin/admin-clients.service.ts +++ b/libs/auth-api-lib/src/lib/clients/admin/admin-clients.service.ts @@ -173,21 +173,6 @@ export class AdminClientsService { throw new BadRequestException('Invalid client id') } - // If user is not super admin, we remove the super admin fields from the input to default to the client base attributes - if (!this.isSuperAdmin(user)) { - clientDto = { - clientId: clientDto.clientId, - clientType: clientDto.clientType, - clientName: clientDto.clientName, - // Remove defined super admin fields - ...omit(clientDto, superUserFields), - // Remove personal representative from delegation types since it is not allowed for non-super admins - supportedDelegationTypes: delegationTypeSuperUserFilter( - clientDto.supportedDelegationTypes ?? [], - ), - } - } - const { customClaims, displayName, @@ -600,7 +585,7 @@ export class AdminClientsService { client.supportedDelegationTypes?.map( (clientDelegationType) => clientDelegationType.delegationType, ) ?? [], - allowedAcr: client.allowedAcr ?? [], + allowedAcr: client.allowedAcr.map((v) => v.toString()) ?? [], } } diff --git a/libs/portals/my-pages/health/src/screens/OrganDonation/OrganDonation.tsx b/libs/portals/my-pages/health/src/screens/OrganDonation/OrganDonation.tsx index 7ef00c370fb5..f99e0cf5b1a0 100644 --- a/libs/portals/my-pages/health/src/screens/OrganDonation/OrganDonation.tsx +++ b/libs/portals/my-pages/health/src/screens/OrganDonation/OrganDonation.tsx @@ -43,8 +43,8 @@ const OrganDonation = () => { iAmOrganDonorWithExceptionsText: formatMessage( m.iAmOrganDonorWithExceptionsText, ), - iAmNotOrganDonorText: formatMessage(m.iAmOrganDonorText), - iAmOrganDonorText: formatMessage(m.iAmNotOrganDonorText), + iAmNotOrganDonorText: formatMessage(m.iAmNotOrganDonorText), + iAmOrganDonorText: formatMessage(m.iAmOrganDonorText), iAmOrganDonorWithExceptions: formatMessage(m.iAmOrganDonorWithExceptions), iAmOrganDonor: formatMessage(m.iAmOrganDonor), iAmNotOrganDonor: formatMessage(m.iAmNotOrganDonor), diff --git a/libs/portals/my-pages/health/src/screens/OrganDonation/components/RegistrationForm.tsx b/libs/portals/my-pages/health/src/screens/OrganDonation/components/RegistrationForm.tsx index 4b4db5a87fcf..f06005e5afae 100644 --- a/libs/portals/my-pages/health/src/screens/OrganDonation/components/RegistrationForm.tsx +++ b/libs/portals/my-pages/health/src/screens/OrganDonation/components/RegistrationForm.tsx @@ -87,7 +87,7 @@ export const OrganRegistrationForm = () => { const formData = new FormData(e.currentTarget) const data = Object.fromEntries(formData.entries()) const idKey = 'selected-limitations-' - const otherLimitations = data['otherLimitatons'].toString() + const otherLimitations = data['otherLimitatons']?.toString() const limitations = Object.keys(data) .filter((key) => key.includes(idKey)) .map((key) => key.replace(idKey, '').toLowerCase())