From a1f8e5a71a294ada29ac3464506d31c85ac38bc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CNaeel=E2=80=9D?= Date: Mon, 15 Jun 2026 10:55:13 +0400 Subject: [PATCH] =?UTF-8?q?v0.6.13:=20=D0=BE=D1=82=D0=BB=D0=B0=D0=B4=D0=BA?= =?UTF-8?q?=D0=B0=20=E2=80=94=20=D0=BF=D0=BE=D0=BA=D0=B0=D0=B7=20email/cli?= =?UTF-8?q?entId/env=20=D0=B2=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- v2/src/config/index.js | 2 +- v2/src/router/index.js | 11 ++++++++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 02dd16b..deb26f7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ipwhitelist", - "version": "0.6.12", + "version": "0.6.13", "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 7211c83..add84d0 100644 --- a/v2/src/config/index.js +++ b/v2/src/config/index.js @@ -9,7 +9,7 @@ // ═══════════════════════════════════════════════════════════════════════════════ module.exports = { - version: '0.6.12', + version: '0.6.13', // ── 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 a11a1a0..37203e4 100644 --- a/v2/src/router/index.js +++ b/v2/src/router/index.js @@ -55,7 +55,16 @@ function resolveContext(req, res, next) { // req.email = ТЕКУЩИЙ юзер (имперсонированный или реальный) req.email = email; req.clientId = isImpersonated ? impersonatedCompanyId : (activeClientId || clientId); - if (!req.clientId) return res.status(400).send('

Ошибка

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

Выйти

'); + if (!req.clientId) return res.status(400).send( + '

Ошибка

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

' + + '

email: ' + email + '

' + + '

clientId: ' + clientId + '

' + + '

activeClientId: ' + activeClientId + '

' + + '

IMPERSONATION_ORIGINAL env: ' + (process.env.IMPERSONATION_ORIGINAL || 'не задан') + '

' + + '

IMPERSONATION_TARGET env: ' + (process.env.IMPERSONATION_TARGET || 'не задан') + '

' + + '

IMPERSONATION_COMPANY env: ' + (process.env.IMPERSONATION_COMPANY || 'не задан') + '

' + + '

Выйти

' + ); req.companyName = companyName || req.clientId; req.isAdmin = (isAdmin && adminMode) || (!!ADMIN_EMAIL && email === ADMIN_EMAIL); req.isImpersonated = isImpersonated;