From d08946381ee7dd7063b48e6f7fcf72da220a0fd2 Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Wed, 20 May 2020 02:23:00 +0300 Subject: [PATCH] updated tr localization and removed unused guidGenerator from MongoIdentityUserRepository --- .../Volo/Abp/Identity/Localization/tr.json | 3 ++- .../MongoDB/MongoIdentityUserRepository.cs | 21 +++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/tr.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/tr.json index 51f1e75dc5..0b17e51276 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/tr.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/tr.json @@ -64,6 +64,7 @@ "Identity.UserNotInRole": "Kullanıcı '{0}' rolünde değil.", "Identity.PasswordConfirmationFailed": "Yeni şifre ile onay şifresi uyuşmuyor.", "Identity.OrganizationUnit.DuplicateDisplayNameWarning": "{0} isminde bir birim zaten var. Aynı seviyede aynı isimli iki birim olamaz.", + "Identity.OrganizationUnit.MaxUserMembershipCount": "Bir kullanıcı için izin verilen en fazla organizasyon birimi sayısı", "Volo.Abp.Identity:010001": "Kendi hesabınızı silemezsiniz!", "Permission:IdentityManagement": "Kimlik yönetimi", "Permission:RoleManagement": "Rol yönetimi", @@ -74,7 +75,7 @@ "Permission:UserManagement": "Kullanıcı yönetimi", "Permission:UserLookup": "Kullanıcı sorgulama", "Volo.Abp.Identity:010002": "Bir kullanıcı en fazla {MaxUserMembershipCount} organizasyon birimine üye olabilir!", - "DisplayName:Abp.Identity.Password.RequiredLength": "Uzunluk gerekli", + "DisplayName:Abp.Identity.Password.RequiredLength": "Uzunluk gerekli", "DisplayName:Abp.Identity.Password.RequiredUniqueChars": "Tekil karakter gerekli", "DisplayName:Abp.Identity.Password.RequireNonAlphanumeric": "Alfasayısal olmayan karakter gerekli", "DisplayName:Abp.Identity.Password.RequireLowercase": "Küçük harf gerekli", 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 3b6c1ef031..b82fdf987c 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 @@ -8,7 +8,6 @@ using System.Threading.Tasks; using MongoDB.Driver; using MongoDB.Driver.Linq; using Volo.Abp.Domain.Repositories.MongoDB; -using Volo.Abp.Guids; using Volo.Abp.MongoDB; namespace Volo.Abp.Identity.MongoDB @@ -58,13 +57,13 @@ namespace Volo.Abp.Identity.MongoDB var organizationUnitIds = user.OrganizationUnits .Select(r => r.OrganizationUnitId) - .ToArray(); - + .ToArray(); + var organizationUnits = DbContext.OrganizationUnits .AsQueryable() .Where(ou => organizationUnitIds.Contains(ou.Id)) - .ToArray(); - + .ToArray(); + var roleIds = organizationUnits.SelectMany(x => x.Roles.Select(r => r.RoleId)).ToArray(); return await DbContext.Roles //TODO: Such usage suppress filters! @@ -202,15 +201,15 @@ namespace Volo.Abp.Identity.MongoDB return result; } - public async Task> GetUsersInOrganizationsListAsync( - List organizationUnitIds, - CancellationToken cancellationToken = default) - { + public async Task> GetUsersInOrganizationsListAsync( + List organizationUnitIds, + CancellationToken cancellationToken = default) + { var result = await GetMongoQueryable() .Where(u => u.OrganizationUnits.Any(uou => organizationUnitIds.Contains(uou.OrganizationUnitId))) .ToListAsync(GetCancellationToken(cancellationToken)) ; - return result; + return result; } public async Task> GetUsersInOrganizationUnitWithChildrenAsync( @@ -227,6 +226,6 @@ namespace Volo.Abp.Identity.MongoDB .Where(u => u.OrganizationUnits.Any(uou => organizationUnitIds.Contains(uou.OrganizationUnitId))) .ToListAsync(GetCancellationToken(cancellationToken)) ; - } + } } }