mirror of https://github.com/abpframework/abp.git
5 changed files with 32 additions and 41 deletions
@ -0,0 +1,14 @@ |
|||
@page "/identity/users" |
|||
@inherits BlazorisePageBase<IIdentityUserAppService, IdentityUserDto, Guid, GetIdentityUsersInput, IdentityUserCreateDto, IdentityUserUpdateDto> |
|||
|
|||
<h3>UserManagement</h3> |
|||
|
|||
@if (Entities != null) |
|||
{ |
|||
<ul> |
|||
@foreach (var user in Entities) |
|||
{ |
|||
<li>@user.UserName</li> |
|||
} |
|||
</ul> |
|||
} |
|||
@ -0,0 +1,16 @@ |
|||
using Volo.Abp.PermissionManagement.Blazor.Components; |
|||
|
|||
namespace Volo.Abp.Identity.Blazor.Pages.Identity |
|||
{ |
|||
public partial class UserManagement |
|||
{ |
|||
private const string PermissionProviderName = "U"; |
|||
|
|||
private PermissionManagementModal PermissionManagementModal; |
|||
|
|||
public UserManagement() |
|||
{ |
|||
ObjectMapperContext = typeof(AbpIdentityBlazorModule); |
|||
} |
|||
} |
|||
} |
|||
@ -1,21 +0,0 @@ |
|||
@page "/identity/users" |
|||
@attribute [Authorize] |
|||
@using Volo.Abp.Identity |
|||
@using Microsoft.AspNetCore.Authorization |
|||
@inject IIdentityUserAppService UserAppService |
|||
|
|||
<h1>Users</h1> |
|||
|
|||
<button class="btn btn-primary" @onclick="GetUsersAsync">Get user list</button> |
|||
|
|||
@if (_users != null) |
|||
{ |
|||
<ul class="mt-2"> |
|||
@foreach (var user in _users) |
|||
{ |
|||
<li>@user.UserName / @user.Email</li> |
|||
} |
|||
</ul> |
|||
|
|||
<p>Total user count: @_totalUserCount</p> |
|||
} |
|||
@ -1,18 +0,0 @@ |
|||
using System.Collections.Generic; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace Volo.Abp.Identity.Blazor.Pages |
|||
{ |
|||
public partial class UserManagement |
|||
{ |
|||
private long _totalUserCount; |
|||
private IReadOnlyList<IdentityUserDto> _users; |
|||
|
|||
private async Task GetUsersAsync() |
|||
{ |
|||
var result = await UserAppService.GetListAsync(new GetIdentityUsersInput()); |
|||
_totalUserCount = result.TotalCount; |
|||
_users = result.Items; |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue