Ends in:
3 DAYS
5 HRS
11 MIN
11 SEC
Ends in:
3 D
5 H
11 M
11 S
Open Closed

v7.3.2 Bug Report: Authority Delegation Issues and Theme Conflict #5626


User avatar
0
alper created
Support Team Director

this issue is reported by shaynevanasperen@gmail.com


• ABP Framework version: v7.3.2 • UI Type: Blazor Server • Database System: EF Core (PostgreSQL) • Tiered (for MVC) or Auth Server Separated (for Angular): no • Exception message and full stack trace: none • Steps to reproduce the issue:

  • Create a brand-new solution using ABP Suite.

  • Log in as the host admin user and create a tenant named Tenant1.

  • Log in as the Tenant1 admin user and create two user accounts: user1 and user2.

  • Log out of the Tenant1 admin user and log back in as the user1 user in Tenant1.

  • Navigate to the Authority Delegation from the user menu. At this stage is the 1st bug: It doesn't actually open the Authority Delegation modal dialog. Instead, it simply navigates to the user account screen. See attached video:

  • Navigate to the Authority Delegation from the user menu for the 2nd time. Now it shows the Authority Delegation modal dialog.

  • Click on the Delegate new user button, and then type user into the search box. At this stage is the 2nd bug: When using dark theme, the background and foreground colours are misconfigured, so it is hard to see what text is being typed into the search box. See attached screenshot of light and dark theme:

  • Select user2 from the search box and then choose a valid date range for the delegation, and then click the Save button. At this stage is the 3rd bug: The newly added delegation does not show in the Delegate users list. Even after refreshing the page, we don't see it in the list. Upon investigation, I found that the delegation record is stored in the database without a TenantId. See attached screenshot:

  • If I then manually update the delegation record in the database to include the correct TenantId, it shows up in the user interface as expected and then the assigned user can actually perform the delegated sign-in.


5 Answer(s)
  • User Avatar
    0
    shaynevanasperen@gmail.com created

    This was previously reported here: https://support.abp.io/QA/Questions/5464/Issues-when-upgrading-from-703-to-730

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    At this stage is the 1st bug: It doesn't actually open the Authority Delegation modal dialog. Instead, it simply navigates to the user account screen. See attached video:

    The blazor server uses a hybrid UI, so it will navigate to the MVC UI.

    I will check other problems and fix them.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    @shaynevanasperen@gmail.com

    This is a temporary solution

    [ExposeServices(typeof(IdentityUserDelegationManager))]
    public class MyIdentityUserDelegationManager : IdentityUserDelegationManager
    {
        public MyIdentityUserDelegationManager(IIdentityUserDelegationRepository identityUserDelegationRepository) : base(identityUserDelegationRepository)
        {
        }
    
        public override async Task DelegateNewUserAsync(Guid sourceUserId, Guid targetUserId, DateTime startTime, DateTime endTime,
            CancellationToken cancellationToken = new CancellationToken())
        {
            if (sourceUserId == targetUserId)
            {
                throw new BusinessException(IdentityErrorCodes.YouCannotDelegateYourself);
            }
            
            await IdentityUserDelegationRepository.InsertAsync(
                new IdentityUserDelegation(
                    GuidGenerator.Create(),
                    sourceUserId,
                    targetUserId,
                    startTime,
                    endTime,
                    CurrentTenant.Id
                ),
                cancellationToken: cancellationToken
            );
        }
    }
    
  • User Avatar
    0
    shaynevanasperen@gmail.com created

    At this stage is the 1st bug: It doesn't actually open the Authority Delegation modal dialog. Instead, it simply navigates to the user account screen. See attached video:

    The blazor server uses a hybrid UI, so it will navigate to the MVC UI.

    I will check other problems and fix them.

    So you are saying that this is by design? How can that be right? The functionality is clearly broken.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Currently, it is like this, you need to click on the menu again.

    We will try to solve this problem in the future version

Made with ❤️ on ABP v9.1.0-preview. Updated on December 02, 2024, 12:35