Activities of "maliming"

ok, no problem.

Yes, you can override the dialog. I'm sharing the full source code of the TenantManagement Blazor component below so you can customize it. Please send an email to liming.ma@volosoft.com

Here are the steps to override it in your Blazor project:

1. Create a single Razor file in your Blazor project

Create MyTenantManagement.razor (e.g., under Pages/Saas/Host/). Use @inherits TenantManagement to inherit the base class — no .razor.cs file is needed since all the logic is inherited from the parent class.

@page "/saas/host/tenants"
@using Volo.Saas.Host.Blazor.Pages.Saas.Host
@inherits TenantManagement

@* Copy the full content from the original TenantManagement.razor here,
   then modify the impersonation modal section as needed. *@

2. Modify the modal section

Remove or modify the username <Field> in the impersonation modal:

@if (Options.Value.EnableTenantImpersonation)
{
    <Modal @ref="TenantImpersonationModal" Closing="ClosingModal" Size="ModalSize.Large" Centered="true">
        <ModalContent>
            <form method="post" action="Account/ImpersonateTenant" id="ImpersonationForm">
                <ModalHeader>
                    <ModalTitle>@L["LoginWithThisTenant"] - @CurrentImpersonationTenantName</ModalTitle>
                    <CloseButton Clicked="CloseTenantImpersonationModal" />
                </ModalHeader>
                <ModalBody>
                    <input type="hidden" name="TenantId" id="ImpersonationTenantId">
                    @* Username input removed - server side will determine the target user *@
                </ModalBody>
                <ModalFooter>
                    <Button Color="Color.Primary" Outline Clicked="CloseTenantImpersonationModal">@L["Cancel"]</Button>
                    <Button Color="Color.Primary" Clicked="@ImpersonationTenantAsync"> @L["Login"]</Button>
                </ModalFooter>
            </form>
        </ModalContent>
    </Modal>
}

3. Server-side enforcement

Remember to also override the server-side ImpersonationExtensionGrant (as described in the previous answer) to handle the empty username and apply your custom logic. Otherwise, the server will fall back to the default admin username.

hi

The issue is caused by a breaking change in ABP v10. IdentityUserAppService sets ObjectMapperContext = typeof(AbpIdentityApplicationModule), which forces the inherited ObjectMapper to use Mapperly (the new default in v10). Your AutoMapper profile is not visible in that context.

Here are two ways to fix it:


Option 1: Keep Using AutoMapper

Inject AutoMapper's IMapper directly into your service and use it instead of the inherited ObjectMapper:

public class MyIdentityUserAppService : IdentityUserAppService
{
    private readonly IMapper _mapper;

    public MyIdentityUserAppService(
        IdentityUserManager userManager,
        IIdentityUserRepository userRepository,
        IIdentityRoleRepository roleRepository,
        IOptions<IdentityOptions> identityOptions,
        IPermissionChecker permissionChecker,
        IMapper mapper
    ) : base(userManager, userRepository, roleRepository, identityOptions, permissionChecker)
    {
        _mapper = mapper;
    }

    public LookupDto<Guid> GetDummy(IdentityUser user)
    {
        return _mapper.Map<LookupDto<Guid>>(user);
    }
}

Your existing AutoMapper profile (CreateMap<IdentityUser, LookupDto<Guid>>) works as-is. No other changes needed.


Option 2: Migrate to Mapperly (Recommended)

Create a Mapperly mapper class. ABP will automatically discover and register it:

public class IdentityUserToLookupDtoMapper : MapperBase<IdentityUser, LookupDto<Guid>>
{
    public override LookupDto<Guid> Map(IdentityUser source)
    {
        return new LookupDto<Guid>
        {
            Id = source.Id,
            DisplayName = $"{source.Name} {source.Surname} ({source.UserName})"
        };
    }
}

Then remove the CreateMap<IdentityUser, LookupDto<Guid>>() entry from your AutoMapper profile.

For more details, see: https://abp.io/docs/latest/framework/infrastructure/object-to-object-mapping#mapperly-integration

Thanks.

hi

Can you create a private GitHub repository and upload your project?

Invite https://github.com/maliming, and I will check and fix it.

Thanks.

hi

non-containerized deployments, but both are failing with various errors during startup.

Could you share the error messages you encountered?

https://abp.io/docs/latest/deployment

Thanks.

hi

Structure: Non-tiered, layered architecture.

Can you share a screenshot of your project structure?

Thanks.

ok, you can add abp.io and all its subdomains *.abp.io.

Yes, you can add them.

Does your whitelist support keywords or subdomains?

Thanks.

hi

It would be easiest if you could add domain keywords or if it supported subdomains.

https://abp.io/ https://nuget.abp.io/ https://account.abp.io/

Thanks.

hi

You can add all abp.io and its subdomains.

Thanks.

Showing 771 to 780 of 12917 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on November 02, 2026, 06:56
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.