diff --git a/package.json b/package.json index 0c43201..25306f1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ipwhitelist", - "version": "0.6.14", + "version": "0.6.15", "description": "IP WhiteList microservice for cloud provider", "main": "server.js", "scripts": { diff --git a/v2/src/config/index.js b/v2/src/config/index.js index 3faf590..e3e75fc 100644 --- a/v2/src/config/index.js +++ b/v2/src/config/index.js @@ -9,7 +9,7 @@ // ═══════════════════════════════════════════════════════════════════════════════ module.exports = { - version: '0.6.14', + version: '0.6.15', // ── IAM ────────────────────────────────────────────────────────────────── iamUrl: process.env.V2_IAM_URL || 'https://auth-api.ngcloud.ru/api/v1/auth/user', diff --git a/v2/src/router/index.js b/v2/src/router/index.js index 7f39848..779dd05 100644 --- a/v2/src/router/index.js +++ b/v2/src/router/index.js @@ -54,7 +54,7 @@ function resolveContext(req, res, next) { // req.email = ТЕКУЩИЙ юзер (имперсонированный или реальный) req.email = email; - req.clientId = isImpersonated ? impersonatedCompanyId : (activeClientId || clientId); + req.clientId = isImpersonated ? (activeClientId || impersonatedCompanyId || clientId) : (activeClientId || clientId); if (!req.clientId) return res.status(400).send( '

Ошибка

Не удалось определить W-номер компании.

' + '

req.clientId: «' + String(req.clientId) + '» (type: ' + typeof req.clientId + ', len: ' + String(req.clientId).length + ')

' +