Hi,
I have test, you can try SeedDataAsync
method in the <YourProjectName>DbMigrationService
and replace it with the following code:
private async Task SeedDataAsync(Tenant tenant = null)
{
Logger.LogInformation($"Executing {(tenant == null ? "host" : tenant.Name + " tenant")} database seed...");
using (var uow = _unitOfWorkManager.Begin(true, true))
{
await _dataSeeder.SeedAsync(new DataSeedContext(tenant?.Id)
.WithProperty(IdentityDataSeedContributor.AdminEmailPropertyName, IdentityDataSeedContributor.AdminEmailDefaultValue)
.WithProperty(IdentityDataSeedContributor.AdminPasswordPropertyName, IdentityDataSeedContributor.AdminPasswordDefaultValue)
);
await uow.CompleteAsync();
}
}
Hi,
You can try use CultureInfo.CurrentUICulture
.
Hi,
Because this qustion has not been active for a long time, system will automatically close it.
Is there a way where I find one item of this list and want to update its "PropertyAdded" column. How do I do this ?
I think the document it clear, you can check it: https://docs.abp.io/en/abp/latest/Object-Extensions#setproperty
Is there any abp.io document where implementation of UserValidator class is provided ? Can you provide me sample of this class ? And how can I find my custom column here ?
Example:
public class MyUserValidator<TUser> : IUserValidator<TUser> where TUser : Volo.Abp.Identity.IdentityUser
{
private readonly IIdentityUserRepository _userRepository;
public MyUserValidator(IIdentityUserRepository userRepository)
{
_userRepository = userRepository;
}
public Task<IdentityResult> ValidateAsync(UserManager<TUser> manager, TUser user)
{
//....
}
}
PreConfigure<IdentityBuilder>(builder =>
{
builder.AddUserValidator<MyUserValidator<Volo.Abp.Identity.IdentityUser>>();
});
In the below code there is one option called options.SignIn.RequireConfirmedEmail If I would able to find my added column here I think it will resolve my issue.
No you can't
Hi,
It works for me.
public class IndexModel : AbpPageModel
{
public void OnGet()
{
throw new Exception("test");
}
}
app.UseExceptionHandler(x => x.Run(async errorContext =>
{
errorContext.Response.StatusCode = (int) HttpStatusCode.InternalServerError;
errorContext.Response.ContentType = "text/html";
await errorContext.Response.WriteAsync("<html lang=\"en\"><body>\r\n");
await errorContext.Response.WriteAsync("ERROR!<br><br>\r\n");
var exceptionHandlerPathFeature =
errorContext.Features.Get<IExceptionHandlerPathFeature>();
if (exceptionHandlerPathFeature?.Error is FileNotFoundException)
{
await errorContext.Response.WriteAsync(
"File error thrown!<br><br>\r\n");
}
await errorContext.Response.WriteAsync(
"<a href=\"/\">Home</a><br>\r\n");
await errorContext.Response.WriteAsync("</body></html>\r\n");
await errorContext.Response.WriteAsync(new string(' ', 512));
}));
Could you share a project to reproduce it? shiwei.liang@volosoft.com
Hi,
When we add the module Lepton.Themes,
Lepton theme is pre-installed, but I will try reproduce it. it will be helpful if you can provide steps to reproduce. thanks.
Hi
And while fetching roles via. RoleRepository.GetListAsync() suppose I want roles only specific for CatA.
Yes you can do this, there are two ways:
var users = (await _userRepository.GetListAsync()).Where(x => x.GetProperty<int>("PropertyAdded") == 1).ToList();
see : https://docs.abp.io/en/abp/latest/Entity-Framework-Core#access-to-the-ef-core-api
var users = (await _userRepository.GetDbSetAsync()).Where(x => EF.Property<int>(x, "PropertyAdded") == 1).ToListAsync();
How can I achieve this and where to do respective changes.
You can use the IUserValidator
See https://github.com/abpframework/abp/issues/3990
hi,
I think you need re create the database.