Browse Source
Fix ConcurrencyStamp consistency issue for IdentityRole and IdentityUser.
pull/13727/head
maliming
4 years ago
No known key found for this signature in database
GPG Key ID: 96224957E51C89E
3 changed files with
3 additions and
3 deletions
-
modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityRole.cs
-
modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUser.cs
-
modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityUserStore_Tests.cs
|
|
|
@ -62,7 +62,7 @@ public class IdentityRole : AggregateRoot<Guid>, IMultiTenant |
|
|
|
Name = name; |
|
|
|
TenantId = tenantId; |
|
|
|
NormalizedName = name.ToUpperInvariant(); |
|
|
|
ConcurrencyStamp = Guid.NewGuid().ToString(); |
|
|
|
ConcurrencyStamp = Guid.NewGuid().ToString("N"); |
|
|
|
|
|
|
|
Claims = new Collection<IdentityRoleClaim>(); |
|
|
|
} |
|
|
|
|
|
|
|
@ -158,7 +158,7 @@ public class IdentityUser : FullAuditedAggregateRoot<Guid>, IUser |
|
|
|
NormalizedUserName = userName.ToUpperInvariant(); |
|
|
|
Email = email; |
|
|
|
NormalizedEmail = email.ToUpperInvariant(); |
|
|
|
ConcurrencyStamp = Guid.NewGuid().ToString(); |
|
|
|
ConcurrencyStamp = Guid.NewGuid().ToString("N"); |
|
|
|
SecurityStamp = Guid.NewGuid().ToString(); |
|
|
|
IsActive = true; |
|
|
|
|
|
|
|
|
|
|
|
@ -112,7 +112,7 @@ public class IdentityUserStore_Tests : AbpIdentityDomainTestBase |
|
|
|
|
|
|
|
(await _identityUserStore.UpdateAsync(user)).Succeeded.ShouldBeTrue(); |
|
|
|
|
|
|
|
user.ConcurrencyStamp = Guid.NewGuid().ToString(); |
|
|
|
user.ConcurrencyStamp = Guid.NewGuid().ToString("N"); |
|
|
|
var identityResult = await _identityUserStore.UpdateAsync(user); |
|
|
|
|
|
|
|
identityResult.Succeeded.ShouldBeFalse(); |
|
|
|
|