From a5dbce8d693027fe53662ec338e2ba8efa27c756 Mon Sep 17 00:00:00 2001 From: malik masis Date: Mon, 28 Nov 2022 13:49:44 +0300 Subject: [PATCH] Used tenantId instead of tenantName --- .../Abp/Identity/IIdentityUserRepository.cs | 4 +-- .../EfCoreIdentityUserRepository.cs | 28 +++++++++---------- .../MongoDB/MongoIdentityUserRepository.cs | 28 +++++++++---------- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IIdentityUserRepository.cs b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IIdentityUserRepository.cs index f026492f5a..f6b2550e9f 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IIdentityUserRepository.cs +++ b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IIdentityUserRepository.cs @@ -58,10 +58,10 @@ public interface IIdentityUserRepository : IBasicRepository bool includeDetails = false, Guid? roleId = null, Guid? organizationUnitId = null, + Guid? tenantId = null, string userName = null, string phoneNumber = null, string emailAddress = null, - string tenantName = null, string name = null, string surname = null, bool? isLockedOut = null, @@ -104,10 +104,10 @@ public interface IIdentityUserRepository : IBasicRepository string filter = null, Guid? roleId = null, Guid? organizationUnitId = null, + Guid? tenantId = null, string userName = null, string phoneNumber = null, string emailAddress = null, - string tenantName = null, string name = null, string surname = null, bool? isLockedOut = null, diff --git a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityUserRepository.cs b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityUserRepository.cs index 5c415aae10..c311397e1e 100644 --- a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityUserRepository.cs +++ b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityUserRepository.cs @@ -139,10 +139,10 @@ public class EfCoreIdentityUserRepository : EfCoreRepository identityUser.Roles.Any(x => x.RoleId == roleId.Value)) .WhereIf(organizationUnitId.HasValue, identityUser => identityUser.OrganizationUnits.Any(x => x.OrganizationUnitId == organizationUnitId.Value)) + .WhereIf(tenantId.HasValue, identityUser => identityUser.TenantId == tenantId) .WhereIf(!string.IsNullOrWhiteSpace(userName), x => x.UserName == userName) .WhereIf(!string.IsNullOrWhiteSpace(phoneNumber), x => x.PhoneNumber == phoneNumber) .WhereIf(!string.IsNullOrWhiteSpace(emailAddress), x => x.Email == emailAddress) + .WhereIf(!string.IsNullOrWhiteSpace(name), x => x.Name == name) + .WhereIf(!string.IsNullOrWhiteSpace(surname), x => x.Surname == surname) .WhereIf(isLockedOut == true, x => x.LockoutEnabled && x.LockoutEnd.Value.CompareTo(DateTime.UtcNow) > 0) .WhereIf(notActive == true, x => !x.IsActive) - .WhereIf(emailConfirmed == true, x => !x.EmailConfirmed) - .WhereIf(isExternal == true, x => !x.IsExternal) + .WhereIf(emailConfirmed == true, x => x.EmailConfirmed) + .WhereIf(isExternal == true, x => x.IsExternal) .WhereIf(maxCreationTime != null, p => p.CreationTime <= maxCreationTime) .WhereIf(minCreationTime != null, p => p.CreationTime >= minCreationTime) .WhereIf(maxModifitionTime != null, p => p.LastModificationTime >= maxModifitionTime) @@ -222,10 +222,10 @@ public class EfCoreIdentityUserRepository : EfCoreRepository identityUser.Roles.Any(x => x.RoleId == roleId.Value)) .WhereIf(organizationUnitId.HasValue, identityUser => identityUser.OrganizationUnits.Any(x => x.OrganizationUnitId == organizationUnitId.Value)) + .WhereIf(tenantId.HasValue, identityUser => identityUser.TenantId == tenantId) .WhereIf(!string.IsNullOrWhiteSpace(userName), x => x.UserName == userName) .WhereIf(!string.IsNullOrWhiteSpace(phoneNumber), x => x.PhoneNumber == phoneNumber) .WhereIf(!string.IsNullOrWhiteSpace(emailAddress), x => x.Email == emailAddress) + .WhereIf(!string.IsNullOrWhiteSpace(name), x => x.Name == name) + .WhereIf(!string.IsNullOrWhiteSpace(surname), x => x.Surname == surname) .WhereIf(isLockedOut == true, x => x.LockoutEnabled && x.LockoutEnd.Value.CompareTo(DateTime.UtcNow) > 0) .WhereIf(notActive == true, x => !x.IsActive) - .WhereIf(emailConfirmed == true, x => !x.EmailConfirmed) - .WhereIf(isExternal == true, x => !x.IsExternal) + .WhereIf(emailConfirmed == true, x => x.EmailConfirmed) + .WhereIf(isExternal == true, x => x.IsExternal) .WhereIf(maxCreationTime != null, p => p.CreationTime <= maxCreationTime) .WhereIf(minCreationTime != null, p => p.CreationTime >= minCreationTime) .WhereIf(maxModifitionTime != null, p => p.LastModificationTime >= maxModifitionTime) diff --git a/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityUserRepository.cs b/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityUserRepository.cs index 54731d56e4..d4a9e05cc3 100644 --- a/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityUserRepository.cs +++ b/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityUserRepository.cs @@ -140,10 +140,10 @@ public class MongoIdentityUserRepository : MongoDbRepository>(roleId.HasValue, identityUser => identityUser.Roles.Any(x => x.RoleId == roleId.Value)) .WhereIf>(organizationUnitId.HasValue, identityUser => identityUser.OrganizationUnits.Any(x => x.OrganizationUnitId == organizationUnitId.Value)) + .WhereIf>(tenantId.HasValue, identityUser => identityUser.TenantId == tenantId.Value) .WhereIf>(!string.IsNullOrWhiteSpace(userName), x => x.UserName == userName) .WhereIf>(!string.IsNullOrWhiteSpace(phoneNumber), x => x.PhoneNumber == phoneNumber) .WhereIf>(!string.IsNullOrWhiteSpace(emailAddress), x => x.Email == emailAddress) + .WhereIf>(!string.IsNullOrWhiteSpace(name), x => x.Name == name) + .WhereIf>(!string.IsNullOrWhiteSpace(surname), x => x.Surname == surname) .WhereIf>(isLockedOut == true, x => x.LockoutEnabled && x.LockoutEnd > DateTimeOffset.UtcNow) .WhereIf>(notActive == true, x => !x.IsActive) - .WhereIf>(emailConfirmed == true, x => !x.EmailConfirmed) - .WhereIf>(isExternal == true, x => !x.IsExternal) + .WhereIf>(emailConfirmed == true, x => x.EmailConfirmed) + .WhereIf>(isExternal == true, x => x.IsExternal) .WhereIf(maxCreationTime != null, p => p.CreationTime <= maxCreationTime) .WhereIf(minCreationTime != null, p => p.CreationTime >= minCreationTime) .WhereIf(maxModifitionTime != null, p => p.LastModificationTime >= maxModifitionTime) @@ -226,10 +226,10 @@ public class MongoIdentityUserRepository : MongoDbRepository>(roleId.HasValue, identityUser => identityUser.Roles.Any(x => x.RoleId == roleId.Value)) .WhereIf>(organizationUnitId.HasValue, identityUser => identityUser.OrganizationUnits.Any(x => x.OrganizationUnitId == organizationUnitId.Value)) + .WhereIf>(tenantId.HasValue, identityUser => identityUser.TenantId == tenantId.Value) .WhereIf>(!string.IsNullOrWhiteSpace(userName), x => x.UserName == userName) .WhereIf>(!string.IsNullOrWhiteSpace(phoneNumber), x => x.PhoneNumber == phoneNumber) .WhereIf>(!string.IsNullOrWhiteSpace(emailAddress), x => x.Email == emailAddress) + .WhereIf>(!string.IsNullOrWhiteSpace(name), x => x.Name == name) + .WhereIf>(!string.IsNullOrWhiteSpace(surname), x => x.Surname == surname) .WhereIf>(isLockedOut == true, x => x.LockoutEnabled && x.LockoutEnd > DateTimeOffset.UtcNow) .WhereIf>(notActive == true, x => !x.IsActive) - .WhereIf>(emailConfirmed == true, x => !x.EmailConfirmed) - .WhereIf>(isExternal == true, x => !x.IsExternal) + .WhereIf>(emailConfirmed == true, x => x.EmailConfirmed) + .WhereIf>(isExternal == true, x => x.IsExternal) .WhereIf>(maxCreationTime != null, p => p.CreationTime <= maxCreationTime) .WhereIf>(minCreationTime != null, p => p.CreationTime >= minCreationTime) .WhereIf>(maxModifitionTime != null, p => p.LastModificationTime >= maxModifitionTime)