@page "/admin/users" @using Microsoft.AspNetCore.Authorization @using Microsoft.AspNetCore.Identity @using EntKube.Web.Data @using EntKube.Web.Services @rendermode InteractiveServer @attribute [Authorize(Roles = "Admin")] @inject UserManagementService UserManagement @inject NavigationManager NavigationManager User Management

Users

Manage system users, roles, and tenant access.

@if (showAddForm) {
New User
@if (!string.IsNullOrEmpty(addError)) {
@addError
}
The account will be created with email pre-confirmed — no email verification needed.
} @if (users is not null && users.Count == 0) { } else if (users is not null) {
@foreach (ApplicationUser user in users) { }
Email Status
@user.Email @if (user.EmailConfirmed) { Confirmed } else { Unconfirmed }
}
@code { private List? users; private bool showAddForm; private bool creating; private string newEmail = ""; private string newPassword = ""; private string? addError; protected override async Task OnInitializedAsync() { await Load(); } private async Task Load() { users = await UserManagement.GetAllUsersAsync(); } private async Task CreateUser() { addError = null; creating = true; try { IdentityResult result = await UserManagement.CreateUserAsync(newEmail.Trim(), newPassword); if (!result.Succeeded) { addError = string.Join(" ", result.Errors.Select(e => e.Description)); return; } newEmail = ""; newPassword = ""; showAddForm = false; await Load(); } finally { creating = false; } } }