Hi @sociomed,
I created an issue for it. You can follow the progress. https://github.com/aspnetzero/aspnet-zero-core/issues/4897
If you want to manually fix it https://github.com/aspnetzero/aspnet-zero-core/blob/dev/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Web.Mvc/Areas/AppAreaName/Views/Layout/Theme6/_Layout.cshtml
Hi @SnapAPdotNet,
To enable users to log in independently of tenants, each user should have a unique identifier. If the username tables contain unique content, you can set them to be used for logging in. Otherwise, you would need to update the email addresses.
I hope this helps! If you have any further questions, feel free to ask.
Hi @pdehealth1,
I couldn't reproduce the issue. Could you give me the steps for reproducing it?
Hi @abarref,
We have plans to upgrade to Angular 16 in our upcoming milestones.
Hi @hongbing.wang,
We will try to find a good solution for it asap.
Hi @XugoWebTeam,
Could you check this article? I think this attribute can solve your problem https://aspnetboilerplate.com/Pages/Documents/Unit-Of-Work#unitofwork-attribute
Hi @XugoWebTeam,
The following snippet may help solve your problem. If the problem persists, let us know.
public class UserManagerTests : AppTestBase
{
private readonly IUserRepository _userRepository;
private readonly IUnitOfWorkManager _unitOfWorkManager;
public UserManagerTests()
{
_userRepository = Resolve<IUserRepository>();
_unitOfWorkManager = Resolve<IUnitOfWorkManager>();
}
[Fact]
public async Task Should_Get_Active_Users()
{
// Arrange
var users = await _userRepository.InsertAsync(new User()
{
UserName = "test", IsActive = true, TenantId = 1, Name = "john", Surname = "smith",
EmailAddress = "[email protected]", Password = "test", NormalizedUserName = "john",
NormalizedEmailAddress = "[email protected]"
});
using var uow = _unitOfWorkManager.Begin();
var activeUsers = await _userRepository.GetAll()
.Where(u => u.IsActive)
.Select(u => u.Id)
.ToListAsync();
activeUsers.ShouldNotBeNull();
// var activeUsers = _userRepository.GetAll()
// .Where(u => u.IsActive)
// .Select(u => u.Id)
// .ToListAsync();
//
// await activeUsers.ShouldNotBeNull();
}
}
Hi @XugoWebTeam,
I think this problem is related to the unit of work. You can use the following code for testing
await UsingDbContextAsync(async context =>
{
var activeUsers = await context.Users
.Where(u => u.IsActive)
.Select(u => u.Id)
.ToListAsync();
activeUsers.ShouldNotBeNull();
});
Hi @murphymj5209,
For now, you can review this solution; it will be fixed in version 12.2.1.
https://support.aspnetzero.com/QA/Questions/11610/power-tool-is-not-generating-properly#answer-3ad0f9b2-22de-c8a1-5af0-3a0ba17e95ba