diff --git a/api/src/paths/user/add.ts b/api/src/paths/user/add.ts index ab81ca477c..29c9692812 100644 --- a/api/src/paths/user/add.ts +++ b/api/src/paths/user/add.ts @@ -3,7 +3,6 @@ import { Operation } from 'express-openapi'; import { SOURCE_SYSTEM, SYSTEM_IDENTITY_SOURCE } from '../../constants/database'; import { SYSTEM_ROLE } from '../../constants/roles'; import { getDBConnection, getServiceAccountDBConnection } from '../../database/db'; -import { HTTP400 } from '../../errors/http-error'; import { authorizeRequestHandler } from '../../request-handlers/security/authorization'; import { UserService } from '../../services/user-service'; import { getKeycloakSource } from '../../utils/keycloak-utils'; @@ -134,12 +133,6 @@ export function addSystemRoleUser(): RequestHandler { const sourceSystem = getKeycloakSource(req['keycloak_token']); - if (!sourceSystem) { - throw new HTTP400('Failed to identify known submission source system', [ - 'token did not contain a clientId/azp or clientId/azp value is unknown' - ]); - } - const connection = sourceSystem ? getServiceAccountDBConnection(sourceSystem) : getDBConnection(req['keycloak_token']);