Browse Source

added missing virtual to identity mongo repositories

pull/7139/head
Galip Tolga Erdem 6 years ago
parent
commit
c6d62a2c99
  1. 2
      modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityClaimTypeRepository.cs
  2. 4
      modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityLinkUserRepository.cs
  3. 6
      modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityRoleRepository.cs
  4. 6
      modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentitySecurityLogRepository.cs
  5. 10
      modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityUserRepository.cs
  6. 8
      modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoOrganizationUnitRepository.cs

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

@ -55,7 +55,7 @@ namespace Volo.Abp.Identity.MongoDB
.ToListAsync(GetCancellationToken(cancellationToken));
}
public async Task<long> GetCountAsync(
public virtual async Task<long> GetCountAsync(
string filter = null,
CancellationToken cancellationToken = default)
{

4
modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityLinkUserRepository.cs

@ -17,7 +17,7 @@ namespace Volo.Abp.Identity.MongoDB
{
}
public async Task<IdentityLinkUser> FindAsync(IdentityLinkUserInfo sourceLinkUserInfo, IdentityLinkUserInfo targetLinkUserInfo, CancellationToken cancellationToken = default)
public virtual async Task<IdentityLinkUser> FindAsync(IdentityLinkUserInfo sourceLinkUserInfo, IdentityLinkUserInfo targetLinkUserInfo, CancellationToken cancellationToken = default)
{
return await (await GetMongoQueryableAsync(cancellationToken))
.OrderBy(x => x.Id).FirstOrDefaultAsync(x =>
@ -28,7 +28,7 @@ namespace Volo.Abp.Identity.MongoDB
, cancellationToken: GetCancellationToken(cancellationToken));
}
public async Task<List<IdentityLinkUser>> GetListAsync(IdentityLinkUserInfo linkUserInfo, CancellationToken cancellationToken = default)
public virtual async Task<List<IdentityLinkUser>> GetListAsync(IdentityLinkUserInfo linkUserInfo, CancellationToken cancellationToken = default)
{
return await (await GetMongoQueryableAsync(cancellationToken)).Where(x =>
x.SourceUserId == linkUserInfo.UserId && x.SourceTenantId == linkUserInfo.TenantId ||

6
modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityRoleRepository.cs

@ -18,7 +18,7 @@ namespace Volo.Abp.Identity.MongoDB
{
}
public async Task<IdentityRole> FindByNormalizedNameAsync(
public virtual async Task<IdentityRole> FindByNormalizedNameAsync(
string normalizedRoleName,
bool includeDetails = true,
CancellationToken cancellationToken = default)
@ -28,7 +28,7 @@ namespace Volo.Abp.Identity.MongoDB
.FirstOrDefaultAsync(r => r.NormalizedName == normalizedRoleName, GetCancellationToken(cancellationToken));
}
public async Task<List<IdentityRole>> GetListAsync(
public virtual async Task<List<IdentityRole>> GetListAsync(
string sorting = null,
int maxResultCount = int.MaxValue,
int skipCount = 0,
@ -64,7 +64,7 @@ namespace Volo.Abp.Identity.MongoDB
.ToListAsync(GetCancellationToken(cancellationToken));
}
public async Task<long> GetCountAsync(
public virtual async Task<long> GetCountAsync(
string filter = null,
CancellationToken cancellationToken = default)
{

6
modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentitySecurityLogRepository.cs

@ -19,7 +19,7 @@ namespace Volo.Abp.Identity.MongoDB
{
}
public async Task<List<IdentitySecurityLog>> GetListAsync(
public virtual async Task<List<IdentitySecurityLog>> GetListAsync(
string sorting = null,
int maxResultCount = 50,
int skipCount = 0,
@ -53,7 +53,7 @@ namespace Volo.Abp.Identity.MongoDB
.ToListAsync(GetCancellationToken(cancellationToken));
}
public async Task<long> GetCountAsync(
public virtual async Task<long> GetCountAsync(
DateTime? startTime = null,
DateTime? endTime = null,
string applicationName = null,
@ -82,7 +82,7 @@ namespace Volo.Abp.Identity.MongoDB
}
public async Task<IdentitySecurityLog> GetByUserIdAsync(Guid id, Guid userId, bool includeDetails = false,
public virtual async Task<IdentitySecurityLog> GetByUserIdAsync(Guid id, Guid userId, bool includeDetails = false,
CancellationToken cancellationToken = default)
{
return await (await GetMongoQueryableAsync(cancellationToken)).OrderBy(x => x.Id).FirstOrDefaultAsync(x => x.Id == id && x.UserId == userId,

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

@ -53,7 +53,7 @@ namespace Volo.Abp.Identity.MongoDB
return await dbContext.Roles.AsQueryable().Where(r => allRoleIds.Contains(r.Id)).Select(r => r.Name).ToListAsync(GetCancellationToken(cancellationToken));
}
public async Task<List<string>> GetRoleNamesInOrganizationUnitAsync(
public virtual async Task<List<string>> GetRoleNamesInOrganizationUnitAsync(
Guid id,
CancellationToken cancellationToken = default)
{
@ -178,7 +178,7 @@ namespace Volo.Abp.Identity.MongoDB
return await dbContext.Roles.AsQueryable().Where(r => allRoleIds.Contains(r.Id)).ToListAsync(GetCancellationToken(cancellationToken));
}
public async Task<List<OrganizationUnit>> GetOrganizationUnitsAsync(
public virtual async Task<List<OrganizationUnit>> GetOrganizationUnitsAsync(
Guid id,
bool includeDetails = false,
CancellationToken cancellationToken = default)
@ -210,7 +210,7 @@ namespace Volo.Abp.Identity.MongoDB
.LongCountAsync(GetCancellationToken(cancellationToken));
}
public async Task<List<IdentityUser>> GetUsersInOrganizationUnitAsync(
public virtual async Task<List<IdentityUser>> GetUsersInOrganizationUnitAsync(
Guid organizationUnitId,
CancellationToken cancellationToken = default)
{
@ -221,7 +221,7 @@ namespace Volo.Abp.Identity.MongoDB
return result;
}
public async Task<List<IdentityUser>> GetUsersInOrganizationsListAsync(
public virtual async Task<List<IdentityUser>> GetUsersInOrganizationsListAsync(
List<Guid> organizationUnitIds,
CancellationToken cancellationToken = default)
{
@ -232,7 +232,7 @@ namespace Volo.Abp.Identity.MongoDB
return result;
}
public async Task<List<IdentityUser>> GetUsersInOrganizationUnitWithChildrenAsync(
public virtual async Task<List<IdentityUser>> GetUsersInOrganizationUnitWithChildrenAsync(
string code,
CancellationToken cancellationToken = default)
{

8
modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoOrganizationUnitRepository.cs

@ -112,7 +112,7 @@ namespace Volo.Abp.Identity.MongoDB
.CountAsync(cancellationToken);
}
public async Task<List<IdentityRole>> GetUnaddedRolesAsync(
public virtual async Task<List<IdentityRole>> GetUnaddedRolesAsync(
OrganizationUnit organizationUnit,
string sorting = null,
int maxResultCount = int.MaxValue,
@ -132,7 +132,7 @@ namespace Volo.Abp.Identity.MongoDB
.ToListAsync(cancellationToken);
}
public async Task<int> GetUnaddedRolesCountAsync(
public virtual async Task<int> GetUnaddedRolesCountAsync(
OrganizationUnit organizationUnit,
string filter = null,
CancellationToken cancellationToken = default)
@ -174,7 +174,7 @@ namespace Volo.Abp.Identity.MongoDB
return await query.CountAsync(cancellationToken);
}
public async Task<List<IdentityUser>> GetUnaddedUsersAsync(
public virtual async Task<List<IdentityUser>> GetUnaddedUsersAsync(
OrganizationUnit organizationUnit,
string sorting = null,
int maxResultCount = int.MaxValue,
@ -199,7 +199,7 @@ namespace Volo.Abp.Identity.MongoDB
.ToListAsync(GetCancellationToken(cancellationToken));
}
public async Task<int> GetUnaddedUsersCountAsync(OrganizationUnit organizationUnit, string filter = null,
public virtual async Task<int> GetUnaddedUsersCountAsync(OrganizationUnit organizationUnit, string filter = null,
CancellationToken cancellationToken = default)
{
var dbContext = await GetDbContextAsync(cancellationToken);

Loading…
Cancel
Save