F1 - Autentcacion - Completa
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
@using Microsoft.AspNetCore.Identity
|
||||
@inject UserManager<ApplicationUser> UserManager
|
||||
@model IEnumerable<ApplicationUser>
|
||||
|
||||
<h1>Usuarios</h1>
|
||||
<p>
|
||||
<a asp-action="Create" class="btn btn-primary">Crear nuevo usuario</a>
|
||||
</p>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nombre</th>
|
||||
<th>Apellido</th>
|
||||
<th>Email</th>
|
||||
<th>Documento</th>
|
||||
<th>Roles</th>
|
||||
<th>Acciones</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var usuario in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>@usuario.Nombre</td>
|
||||
<td>@usuario.Apellido</td>
|
||||
<td>@usuario.Email</td>
|
||||
<td>@usuario.Documento</td>
|
||||
<td>
|
||||
@{
|
||||
var roles = await UserManager.GetRolesAsync(usuario);
|
||||
@string.Join(", ", roles)
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Details" asp-route-id="@usuario.Id" class="btn btn-info btn-sm">Detalles</a>
|
||||
<a asp-action="Edit" asp-route-id="@usuario.Id" class="btn btn-warning btn-sm">Editar</a>
|
||||
<a asp-action="Delete" asp-route-id="@usuario.Id" class="btn btn-danger btn-sm">Eliminar</a>
|
||||
<a asp-action="ManageRoles" asp-route-id="@usuario.Id" class="btn btn-secondary btn-sm">Roles</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
Reference in New Issue
Block a user