Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Editing a user that has organization unit fails as it says the user is already in the role #7656


User avatar
0
rbohac created

In v7.0.0, unable to edit if you have a user who is mapped to an organization unit that has roles associated with the organization unit. This ends up saying the user has those roles, but then when you try to save, it also fails as it says: WARN 2019-09-13 17:21:05,791 [255 ] Mvc.ExceptionHandling.AbpExceptionFilter - User already in role 'IT Engineering'. Abp.UI.UserFriendlyException: User already in role 'IT Engineering'. at Abp.IdentityFramework.IdentityResultExtensions.CheckErrors(IdentityResult identityResult, ILocalizationManager localizationManager) in D:\Github\aspnetboilerplate\src\Abp.ZeroCore\IdentityFramework\IdentityResultExtensions.cs:line 72 at MotionCX.MotionCXAppServiceBase.CheckErrors(IdentityResult identityResult) in C:\mcx\MP.Server\aspnet-core\src\MotionCX.Application\MotionCXAppServiceBase.cs:line 62

That said, if you uncheck all roles, then save, it works fine. Then, you can edit the user again, and the roles show up (due to the role being in th orgnaization unit). This causes a lot of issues (obviously). Not sure if this is already a ticket opened on this, but I tried to find one, and wasn't able to locate it.


2 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    see https://github.com/aspnetzero/aspnet-zero-core/issues/2638

  • User Avatar
    0
    ismcagdas created
    Support Team

    This is already fixed.