From 9f7150c3452ea0f60c4427fb7f3e7adefa10cdd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CNaeel=E2=80=9D?= Date: Mon, 15 Jun 2026 09:55:35 +0400 Subject: [PATCH] =?UTF-8?q?v0.6.2:=20email=20=D1=8E=D0=B7=D0=B5=D1=80?= =?UTF-8?q?=D0=B0=20=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=B0=20=D0=BE=D1=82=20?= =?UTF-8?q?=D1=81=D1=82=D0=B0=D1=82=D0=B8=D1=81=D1=82=D0=B8=D0=BA=D0=B8=20?= =?UTF-8?q?+=20loginEmail=20=D0=B2=20header?= 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/user/index.js | 1 + views/v2/user.ejs | 10 +++++++--- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 98bc48a..650541e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ipwhitelist", - "version": "0.6.1", + "version": "0.6.2", "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 5f14790..cd3969a 100644 --- a/v2/src/config/index.js +++ b/v2/src/config/index.js @@ -9,7 +9,7 @@ // ═══════════════════════════════════════════════════════════════════════════════ module.exports = { - version: '0.6.1', + version: '0.6.2', // ── IAM ────────────────────────────────────────────────────────────────── iamUrl: process.env.V2_IAM_URL || 'https://auth-api.ngcloud.ru/api/v1/auth/user', diff --git a/v2/src/user/index.js b/v2/src/user/index.js index c22a750..08dd3bb 100644 --- a/v2/src/user/index.js +++ b/v2/src/user/index.js @@ -42,6 +42,7 @@ function createUserRouter() { isImpersonated: req.isImpersonated || false, originalUserEmail: req.impersonatedBy ? req.email : null, email: req.email || (req.user && req.user.email) || (req.session && req.session.user && req.session.user.email) || '', + loginEmail: (req.session && req.session.user && req.session.user.email) || req.email || '', }); } catch (e) { res.status(500).send('

Ошибка

' + e.message + '
Назад'); diff --git a/views/v2/user.ejs b/views/v2/user.ejs index b287b80..bbbd028 100644 --- a/views/v2/user.ejs +++ b/views/v2/user.ejs @@ -70,7 +70,7 @@ <% }) %> - Выйти (<%= email %>) + Выйти (<%= loginEmail %>) @@ -79,8 +79,8 @@ <% if (typeof isImpersonated !== 'undefined' && isImpersonated) { %>
- ⚠️ Режим имперсонации — данные от имени <%= user.activeClientId || user.clientId %> - (вы: <%= user.originalUserEmail || user.email %>) + ⚠️ Режим имперсонации — данные от имени <%= activeClientId %> + (вы: <%= loginEmail %>)
<% } %> @@ -98,6 +98,10 @@
<%= used %>
из <%= limit %>
+
+ <%= email %> + <% if (isImpersonated) { %>(имперсонация)<% } %> +