diff --git a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs b/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs index 0220d2218d..f9b5a53a46 100644 --- a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs +++ b/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs @@ -224,9 +224,9 @@ public class IdentityUserAppService : IdentityAppServiceBase, IIdentityUserAppSe var operatorOwnRoleSet = (await UserManager.GetRolesAsync(operatorUser)).ToHashSet(StringComparer.OrdinalIgnoreCase); var inputRoleNameSet = new HashSet(inputRoleNames ?? Array.Empty(), StringComparer.OrdinalIgnoreCase); - var keepUnmanageableRoles = targetCurrentRoleSet.Except(operatorOwnRoleSet); + var keepUnmanageableRoles = targetCurrentRoleSet.Except(operatorOwnRoleSet, StringComparer.OrdinalIgnoreCase); - var desiredManageableRoles = inputRoleNameSet.Intersect(operatorOwnRoleSet); + var desiredManageableRoles = inputRoleNameSet.Intersect(operatorOwnRoleSet, StringComparer.OrdinalIgnoreCase); return keepUnmanageableRoles .Concat(desiredManageableRoles)