v0.5.104: админ видит (личное) у своих компаний в dropdown

This commit is contained in:
2026-06-15 13:41:01 +04:00
parent f00b7f3e87
commit 2545bc97f1
4 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -9,7 +9,7 @@
// ═══════════════════════════════════════════════════════════════════════════════
module.exports = {
version: '0.5.100',
version: '0.5.101',
// ── IAM ──────────────────────────────────────────────────────────────────
iamUrl: process.env.V2_IAM_URL || 'https://auth-api.ngcloud.ru/api/v1/auth/user',
+2
View File
@@ -51,10 +51,12 @@ function createUserRouter() {
let companies;
if (isAdmin) {
const all = await q.getAllCompanies();
const ownIds = new Set(req.allClientIds || []);
companies = all.map(c => ({
client_id: c.client_id,
name: c.name || c.client_id,
active_count: c.active_count,
isPersonal: ownIds.has(c.client_id),
}));
} else {
companies = (req.profiles && req.profiles.length > 0)