feat: IAM impersonation support — isImpersonated flag + banner
- src/auth.js: fetchIamUser extract isImpersonated from response - src/routes/oidc.js: save isImpersonated to session - ui/index.js: isImpersonated in req.user - ui/routes/entries.js: pass isImpersonated to render - views/index.ejs: banner 'Режим имперсонации' - docs/PLAN-impersonation.md: план дальнейших шагов (двойной аудит)
This commit is contained in:
@@ -182,6 +182,12 @@
|
||||
<% if (success) { %><div class="alert alert-ok"><%= success %></div><% } %>
|
||||
<% if (error) { %><div class="alert alert-err"><%= error %></div><% } %>
|
||||
|
||||
<% if (typeof isImpersonated !== 'undefined' && isImpersonated) { %>
|
||||
<div style="background:#fef3c7;border:1px solid #d97706;color:#92400e;padding:.5rem 1rem;border-radius:8px;margin-bottom:.5rem;font-size:.85rem;">
|
||||
⚠️ Режим имперсонации — данные сохраняются от имени <strong><%= user.clientId %></strong>
|
||||
</div>
|
||||
<% } %>
|
||||
|
||||
<%
|
||||
// Для admin: selectedCompany — выбранная компания (объект из getAllCompanies).
|
||||
// Для обычного пользователя: selectedCompany — их компания (из getOrCreateCompany).
|
||||
|
||||
Reference in New Issue
Block a user