From 897b5d9eade1c794bc3a160cab6d23ae80af8c63 Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 26 Dec 2023 12:48:05 +0800 Subject: [PATCH] Set `IdentityOptions` when updating user role. --- .../Volo/Abp/Identity/IdentityUserAppService.cs | 1 + 1 file changed, 1 insertion(+) 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 fa1beb9124..d20158f16e 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 @@ -140,6 +140,7 @@ public class IdentityUserAppService : IdentityAppServiceBase, IIdentityUserAppSe [Authorize(IdentityPermissions.Users.Update)] public virtual async Task UpdateRolesAsync(Guid id, IdentityUserUpdateRolesDto input) { + await IdentityOptions.SetAsync(); var user = await UserManager.GetByIdAsync(id); (await UserManager.SetRolesAsync(user, input.RoleNames)).CheckErrors(); await UserRepository.UpdateAsync(user);