Skip to content

Commit

Permalink
Rename to RemoveClaimFromAllUsersAsync .
Browse files Browse the repository at this point in the history
  • Loading branch information
maliming committed May 17, 2024
1 parent 54e52ea commit 3a7b419
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Task<List<IdentityUser>> GetListByClaimAsync(
CancellationToken cancellationToken = default
);

Task RemoveClaimFromAllUsers(
Task RemoveClaimFromAllUsersAsync(
string claimType,
bool autoSave = false,
CancellationToken cancellationToken = default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public virtual async Task DeleteAsync(Guid id)
}

//Remove claim of this type from all users
await IdentityUserRepository.RemoveClaimFromAllUsers(claimType.Name);
await IdentityUserRepository.RemoveClaimFromAllUsersAsync(claimType.Name);
await IdentityClaimTypeRepository.DeleteAsync(id);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public virtual async Task<List<IdentityUser>> GetListByClaimAsync(
.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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public virtual async Task<List<IdentityUser>> GetListByClaimAsync(
.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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public async Task DeleteAsync()
}

await ClaimTypeRepository.DeleteAsync(ageClaim.Id);
await UserRepository.RemoveClaimFromAllUsers(ageClaim.Name);
await UserRepository.RemoveClaimFromAllUsersAsync(ageClaim.Name);

using (var uow = UnitOfWorkManager.Begin())
{
Expand Down

0 comments on commit 3a7b419

Please sign in to comment.