Hi, I am using Abp version 3.3.2, I have checked the code, it does not support upload/download content using stream, is there a way to override it to using stream same as 4.x version, how many files we need to override, could you please guide me the steps?
Another issue I found when trying Abp version 4.3.2, the downloaded file size is 0kb when downloading the large file (around ~500mb and above), there is no exception in the logs.
Hi @liangshiwei, Ok, I see, I need to customize the external login callback method to create the external user before calling the ExternalLoginSignInAsync.
Thanks for your support.
ABP Framework version: v3.3.2 UI type: Angular DB provider: EF Core Identity Server Separated: yes
Hi, I found an issue when user does first login with external login provider, the security log has logged one record with Action = 'LoginFailed' even I had logged in successfully.
Another question, after I completed the registration for new user, the new user has been inserted into AbpUsers table but the flag IsExternal = 0, it should be 1, right?
ABP Framework version: v3.3.2 UI type: Angular DB provider: EF Core Tiered (MVC) or Identity Server Separated (Angular): yes
Hi, I have installed the file management module as guided:
Backend:
Angular UI:
but the "File Management" is not displayed in the menu section:
any idea?
Hi @maliming, yup, it works now.
Thanks for your support!!!
Hi @maliming, thanks for your prompt reply.
I just tried, the [DisableValidation] works in controller method but not in AppService method, the validation is still triggered.
Hi @alper, I tried to put [DisableValidation] to CreateAsync in both Controller and AppService, it still does not work.
if the Password field has value, it hits the method -> the override is succesfully
if the Password is null/empty, the validation is triggered -> the [DisableValidation] is not working
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IdentityUserController))]
public class CustomIdentityUserController : IdentityUserController
{
public CustomIdentityUserController(IIdentityUserAppService userAppService) : base(userAppService)
{
}
[DisableValidation]
public override Task<IdentityUserDto> CreateAsync(IdentityUserCreateDto input)
{
return UserAppService.CreateAsync(input);
}
}
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IdentityUserAppService))]
public class CustomIdentityUserAppService : IdentityUserAppService
{
public CustomIdentityUserAppService(
IdentityUserManager userManager,
IIdentityUserRepository userRepository,
IIdentityRoleRepository roleRepository,
IOrganizationUnitRepository organizationUnitRepository,
IIdentityClaimTypeRepository identityClaimTypeRepository,
IdentityTwoFactorManager identityTwoFactorManager
) : base(userManager,
userRepository,
roleRepository,
organizationUnitRepository,
identityClaimTypeRepository,
identityTwoFactorManager)
{
}
[DisableValidation]
public override async Task<IdentityUserDto> CreateAsync(IdentityUserCreateDto input)
{
var user = new IdentityUser(
GuidGenerator.Create(),
input.UserName,
input.Email,
CurrentTenant.Id
);
input.MapExtraPropertiesTo(user);
(await UserManager.CreateAsync(user)).CheckErrors();
await UpdateUserByInput(user, input);
await CurrentUnitOfWork.SaveChangesAsync();
var userDto = ObjectMapper.Map<IdentityUser, IdentityUserDto>(user);
return userDto;
}
}
Hi @alper, yes, it hits the breakpoint inside the method.
Regarding fluent validation, can give me some insights how to by pass the [Required] data annotation validation? As I know, it still triggers the data annotation validation before hit the FluentValidation.
Thanks for your support.
I want to remove/disable the [Required] attribute for "Password" field in IdentityUserCreateDto
It seems could not achieve it so I disabled the validation by putting [DisableValidation] in the CreateAsync method, but it does not work:
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IdentityUserController))]
public class CustomIdentityUserController : IdentityUserController
{
public CustomIdentityUserController(IIdentityUserAppService userAppService) : base(userAppService)
{
}
[DisableValidation]
public override Task<IdentityUserDto> CreateAsync(IdentityUserCreateDto input)
{
return UserAppService.CreateAsync(input);
}
}
Any advice woule be appreciated much, thank you.
Hi @maliming, I found it under Saas -> Tenants -> Manage Host Features", thank you.