Open Closed

Edit IdentityUser Modal Not Open #6540


User avatar
0
hussein created
  • ABP Framework version: v7.4.2 and v8.0.1
  • UI Type: MVC
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): MVC
  • Exception message and full stack trace: There is no entity IdentityUser with id = 73d0adc8-6c63-ceeb-4b3a-3a103da86e3c!
  • Steps to reproduce the issue:
  • 1- create a new user
  • 2- delete the creator user
  • 3- edit the last created user the issue here is when you try to open the edit user modal, it try to get the user details (creator ) which have already been deleted and it will return an error message "There is no entity IdentityUser with id = 73d0adc8-6c63-ceeb-4b3a-3a103da86e3c!" as a temporary solution to fix this bug we should override the the following method to disable the IsoftDelete filter as the following

public override async Task<IdentityUserDto> GetAsync(Guid id) { using (DataFilter.Disable<ISoftDelete>()) return await base.GetAsync( id ); }

i have a question related to this if I want to display all the users in the table as admin, if I disabled the filter for ISoftDeleted, unfortunately, the IdentityUserDto doesn't return IsDeleted and deletionTime with return data, how to fix this?

public override async Task<PagedResultDto<IdentityUserDto>> GetListAsync(GetIdentityUsersInput input) { using (DataFilter.Disable<ISoftDelete>()) return await base.GetListAsync(input); }


4 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    This is the default behavior. You can't edit deleted users.

    1- create a new user
    2- delete the creator user
    3- edit the last created user
    

    if I want to display all the users in the table as admin, if I disabled the filter for ISoftDeleted, unfortunately, the IdentityUserDto doesn't return IsDeleted and deletionTime with return data, how to fix this?

    You can add new endpoint to return the dto with deletion info.

  • User Avatar
    0
    hussein created

    you did answer: Exception message and full stack trace! i think it is a BUG

    for the 2nd part, what you mean add new endpoint to return dto with deletion info?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    I see, I will try to reproduce this. Thanks.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    We will fix this in the next 8.0 patch version.

    Your question credit has been refunded.

    We will also add the IsDeleted and deletionTime to IdentityUserDto

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11