From ab4733d42af29ba40c7187001d6c08ebe2ba655c Mon Sep 17 00:00:00 2001 From: Kjartan Date: Tue, 12 Sep 2023 10:49:03 -0700 Subject: [PATCH] fix regular insert user --- api/src/paths/user/add.ts | 7 ------- 1 file changed, 7 deletions(-) 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']);