v0.6.18: авто-имперсонация выставляет isAdmin + adminMode

This commit is contained in:
2026-06-15 11:11:25 +04:00
parent 92667497a3
commit 1298d25601
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "ipwhitelist",
"version": "0.6.17",
"version": "0.6.18",
"description": "IP WhiteList microservice for cloud provider",
"main": "server.js",
"scripts": {
+2
View File
@@ -42,6 +42,8 @@ function enhanceImpersonation(req, res, next) {
u.allClientIds = allCids;
u.isImpersonated = true;
u.impersonatedCompanyId = COMPANY; // для resolveContext
u.isAdmin = true; // псевдо-админ
u.adminMode = true; // включён
u.companyName = COMPANY;
u.profiles = allCids.map(cid => ({ client_id: cid, company_name: cid }));