Browse Source

Rename to `RemoveClaimFromAllUsersAsync `.

pull/19853/head
maliming 2 years ago
parent
commit
3a7b4191f2
No known key found for this signature in database GPG Key ID: A646B9CB645ECEA4
  1. 2
      modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IIdentityUserRepository.cs
  2. 2
      modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityClaimTypeManager.cs
  3. 2
      modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityUserRepository.cs
  4. 2
      modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityUserRepository.cs
  5. 2
      modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/IdentityClaimTypeRepository_Tests.cs

2
modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IIdentityUserRepository.cs

@ -44,7 +44,7 @@ public interface IIdentityUserRepository : IBasicRepository<IdentityUser, Guid>
CancellationToken cancellationToken = default
);
Task RemoveClaimFromAllUsers(
Task RemoveClaimFromAllUsersAsync(
string claimType,
bool autoSave = false,
CancellationToken cancellationToken = default

2
modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityClaimTypeManager.cs

@ -51,7 +51,7 @@ public class IdentityClaimTypeManager : DomainService
}
//Remove claim of this type from all users
await IdentityUserRepository.RemoveClaimFromAllUsers(claimType.Name);
await IdentityUserRepository.RemoveClaimFromAllUsersAsync(claimType.Name);
await IdentityClaimTypeRepository.DeleteAsync(id);
}
}

2
modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityUserRepository.cs

@ -145,7 +145,7 @@ public class EfCoreIdentityUserRepository : EfCoreRepository<IIdentityDbContext,
.ToListAsync(GetCancellationToken(cancellationToken));
}
public virtual async Task RemoveClaimFromAllUsers(string claimType, bool autoSave, CancellationToken cancellationToken = default)
public virtual async Task RemoveClaimFromAllUsersAsync(string claimType, bool autoSave, CancellationToken cancellationToken = default)
{
var dbContext = await GetDbContextAsync();
var userClaims = await dbContext.Set<IdentityUserClaim>().Where(uc => uc.ClaimType == claimType).ToListAsync(cancellationToken: cancellationToken);

2
modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityUserRepository.cs

@ -108,7 +108,7 @@ public class MongoIdentityUserRepository : MongoDbRepository<IAbpIdentityMongoDb
.ToListAsync(GetCancellationToken(cancellationToken));
}
public virtual async Task RemoveClaimFromAllUsers(string claimType, bool autoSave, CancellationToken cancellationToken = default)
public virtual async Task RemoveClaimFromAllUsersAsync(string claimType, bool autoSave, CancellationToken cancellationToken = default)
{
var users = await (await GetMongoQueryableAsync(cancellationToken))
.Where(u => u.Claims.Any(c => c.ClaimType == claimType))

2
modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/IdentityClaimTypeRepository_Tests.cs

@ -80,7 +80,7 @@ public abstract class IdentityClaimTypeRepository_Tests<TStartupModule> : AbpIde
}
await ClaimTypeRepository.DeleteAsync(ageClaim.Id);
await UserRepository.RemoveClaimFromAllUsers(ageClaim.Name);
await UserRepository.RemoveClaimFromAllUsersAsync(ageClaim.Name);
using (var uow = UnitOfWorkManager.Begin())
{

Loading…
Cancel
Save