@page "/account" @* v1's Account page surfaced per-cluster role grants alongside identity. v2 dropped per-cluster grants in favour of fleet-wide LDAP-group → role mapping (Q4 of the AdminUI rebuild plan), so this version only shows identity + the resolved fleet roles + raw LDAP groups for troubleshooting. *@ @attribute [Microsoft.AspNetCore.Authorization.Authorize] @using System.Security.Claims

My account

@{ var username = context.User.FindFirst(ClaimTypes.NameIdentifier)?.Value ?? context.User.Identity?.Name ?? "—"; var displayName = context.User.Identity?.Name ?? "—"; var roles = context.User.Claims .Where(c => c.Type == ClaimTypes.Role).Select(c => c.Value) .OrderBy(s => s, StringComparer.OrdinalIgnoreCase).ToList(); var ldapGroups = context.User.Claims .Where(c => c.Type == "ldap_group").Select(c => c.Value) .OrderBy(s => s, StringComparer.OrdinalIgnoreCase).ToList(); }
Identity
Username@username
Display name@displayName
Fleet roles
Resolved roles @if (roles.Count == 0) { none — sign-in should have been blocked; session claim is likely stale } else { @foreach (var r in roles) { @r } }
LDAP groups @if (ldapGroups.Count == 0) { none } else { @foreach (var g in ldapGroups) { @g } }
Fleet roles come from LDAP group membership via the Authentication:Ldap:GroupToRole mapping. To change them, edit the LDAP group on the directory server; the next sign-in picks up the change. Sign out + sign back in to refresh the cookie claim.