Thanks This solved the problem
public override async Task<IRemoteStreamContent> GetProfilePictureFileAsync(Guid id)
{
Guid? targetTenantId = null;
using (DataFilter.Disable<IMultiTenant>())
{
var user = await UserRepository.FindAsync(id);
targetTenantId = user.TenantId;
}
using (CurrentTenant.Change(targetTenantId))
{
return await base.GetProfilePictureFileAsync(id);
}
}
This is what I have done, but still getting default profile image
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IAccountAppService), typeof(AccountAppService),
typeof(MyAccountAppService))]
public class MyAccountAppService : AccountAppService
{
public RecruitansAccountAppService(
IdentityUserManager userManager,
IAccountEmailer accountEmailer,
IAccountPhoneService phoneService,
IIdentityRoleRepository roleRepository,
IdentitySecurityLogManager identitySecurityLogManager,
IBlobContainer accountProfilePictureContainer,
ISettingManager settingManager,
IOptions identityOptions,
IIdentitySecurityLogRepository securityLogRepository)
: base(userManager, accountEmailer, phoneService, roleRepository, identitySecurityLogManager,
accountProfilePictureContainer, settingManager, identityOptions, securityLogRepository)
{
}
public override async Task<IRemoteStreamContent> GetProfilePictureFileAsync(Guid id)
{
using (DataFilter.Disable<IMultiTenant>())
{
return await base.GetProfilePictureFileAsync(id);
}
}
}
Thanks, This solved my problem What about edition features seed contributor? Do you have an example?
Hi I have some predefined roles and seed them during migration. I want to add permissions to those roles during seed process. Docs recommend to define permission providers in Application.Contracts project, but PermissionDefenitionProvider are reflected while starting web project. I also moved them to Domain.Shared project, but not succeed. I will be glad if you give a good and standard solution for this scenario.