diff --git a/BTCPayServer/Controllers/ServerController.Users.cs b/BTCPayServer/Controllers/ServerController.Users.cs index 10927f507..d28444916 100644 --- a/BTCPayServer/Controllers/ServerController.Users.cs +++ b/BTCPayServer/Controllers/ServerController.Users.cs @@ -63,6 +63,12 @@ namespace BTCPayServer.Controllers }) .ToListAsync(); model.Total = await usersQuery.CountAsync(); + + foreach (UsersViewModel.UserViewModel uvm in model.Users) + { + var userId = await _UserManager.FindByIdAsync(uvm.Id); + uvm.IsAdmin = await _userService.IsAdminUser(userId);; + } return View(model); } diff --git a/BTCPayServer/Views/Server/ListUsers.cshtml b/BTCPayServer/Views/Server/ListUsers.cshtml index 3539224cd..795fdacd3 100644 --- a/BTCPayServer/Views/Server/ListUsers.cshtml +++ b/BTCPayServer/Views/Server/ListUsers.cshtml @@ -62,7 +62,13 @@ @foreach (var user in Model.Users) {