Browse Source

Merge pull request #20533 from abpframework/SetRoleNameAsync

Only changes role name if it actual changed.
pull/20534/head
Engincan VESKE 2 years ago
committed by GitHub
parent
commit
48bba04b8f
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 5
      modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityRoleAppService.cs

5
modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityRoleAppService.cs

@ -77,7 +77,10 @@ public class IdentityRoleAppService : IdentityAppServiceBase, IIdentityRoleAppSe
role.SetConcurrencyStampIfNotNull(input.ConcurrencyStamp);
(await RoleManager.SetRoleNameAsync(role, input.Name)).CheckErrors();
if (role.Name != input.Name)
{
(await RoleManager.SetRoleNameAsync(role, input.Name)).CheckErrors();
}
role.IsDefault = input.IsDefault;
role.IsPublic = input.IsPublic;

Loading…
Cancel
Save