Activities of "sh_erfan"

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);
    }
}
  • ABP Framework version: 5.2
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Steps to reproduce the issue:"
    • Create new project,
    • Override GetProfilePictureFile method of IAccountAppService in identity server project
    • Disable MultiTenant to get profile picture of user from another tenant

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.

Showing 11 to 14 of 14 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11