From a90ac774a954019847a338e597908845189d60d1 Mon Sep 17 00:00:00 2001 From: maliming Date: Mon, 9 Feb 2026 20:31:26 +0800 Subject: [PATCH] Use case-insensitive set ops for role names --- .../Volo/Abp/Identity/IdentityUserAppService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)