diff --git a/.github/workflows/auto-pr.yml b/.github/workflows/auto-pr.yml index 90bd550d9d..9f3ddb4289 100644 --- a/.github/workflows/auto-pr.yml +++ b/.github/workflows/auto-pr.yml @@ -1,4 +1,4 @@ -name: Merge branch dev with rel-10.4 +name: Merge branch rel-10.5 with rel-10.4 on: push: branches: @@ -7,7 +7,7 @@ permissions: contents: read jobs: - merge-dev-with-rel-10-4: + merge-rel-10-5-with-rel-10-4: permissions: contents: write # for peter-evans/create-pull-request to create branch pull-requests: write # for peter-evans/create-pull-request to create a PR @@ -15,7 +15,7 @@ jobs: steps: - uses: actions/checkout@v2 with: - ref: dev + ref: rel-10.5 - name: Reset promotion branch run: | git fetch origin rel-10.4:rel-10.4 @@ -24,8 +24,8 @@ jobs: uses: peter-evans/create-pull-request@v3 with: branch: auto-merge/rel-10-4/${{github.run_number}} - title: Merge branch dev with rel-10.4 - body: This PR generated automatically to merge dev with rel-10.4. Please review the changed files before merging to prevent any errors that may occur. + title: Merge branch rel-10.5 with rel-10.4 + body: This PR generated automatically to merge rel-10.5 with rel-10.4. Please review the changed files before merging to prevent any errors that may occur. draft: true token: ${{ github.token }} - name: Merge Pull Request diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApiExploring/AbpRemoteServiceApiDescriptionProvider.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApiExploring/AbpRemoteServiceApiDescriptionProvider.cs index 8c93400929..e7979584d8 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApiExploring/AbpRemoteServiceApiDescriptionProvider.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApiExploring/AbpRemoteServiceApiDescriptionProvider.cs @@ -59,13 +59,20 @@ public class AbpRemoteServiceApiDescriptionProvider : IApiDescriptionProvider, I protected virtual IEnumerable GetApiResponseTypes() { - foreach (var apiResponse in _options.SupportedResponseTypes) + foreach (var template in _options.SupportedResponseTypes) { - apiResponse.ModelMetadata = _modelMetadataProvider.GetMetadataForType(apiResponse.Type!); + var apiResponse = new ApiResponseType + { + Type = template.Type, + StatusCode = template.StatusCode, + Description = template.Description, + IsDefaultResponse = template.IsDefaultResponse, + ModelMetadata = _modelMetadataProvider.GetMetadataForType(template.Type!) + }; foreach (var responseTypeMetadataProvider in _mvcOptions.OutputFormatters.OfType()) { - var formatterSupportedContentTypes = responseTypeMetadataProvider.GetSupportedContentTypes(null!, apiResponse.Type!); + var formatterSupportedContentTypes = responseTypeMetadataProvider.GetSupportedContentTypes(null!, template.Type!); if (formatterSupportedContentTypes == null) { continue; @@ -80,8 +87,8 @@ public class AbpRemoteServiceApiDescriptionProvider : IApiDescriptionProvider, I }); } } - } - return _options.SupportedResponseTypes; + yield return apiResponse; + } } } diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ApiExploring/AbpRemoteServiceApiDescriptionProvider_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ApiExploring/AbpRemoteServiceApiDescriptionProvider_Tests.cs new file mode 100644 index 0000000000..9a062e0fc3 --- /dev/null +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ApiExploring/AbpRemoteServiceApiDescriptionProvider_Tests.cs @@ -0,0 +1,151 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.ApiExplorer; +using Microsoft.AspNetCore.Mvc.Controllers; +using Microsoft.AspNetCore.Mvc.Formatters; +using Microsoft.AspNetCore.Mvc.ModelBinding; +using Microsoft.AspNetCore.Mvc.Routing; +using Microsoft.Extensions.Options; +using Shouldly; +using Xunit; + +namespace Volo.Abp.AspNetCore.Mvc.ApiExploring; + +public class AbpRemoteServiceApiDescriptionProvider_Tests +{ + private static (AbpRemoteServiceApiDescriptionProvider provider, + AbpRemoteServiceApiDescriptionProviderOptions options) + CreateProvider() + { + var options = new AbpRemoteServiceApiDescriptionProviderOptions(); + options.SupportedResponseTypes.Add(new ApiResponseType + { + Type = typeof(string), + StatusCode = 400 + }); + options.SupportedResponseTypes.Add(new ApiResponseType + { + Type = typeof(string), + StatusCode = 500 + }); + + var mvcOptions = new MvcOptions(); + mvcOptions.OutputFormatters.Add(new FakeOutputFormatter()); + + var provider = new AbpRemoteServiceApiDescriptionProvider( + new EmptyModelMetadataProvider(), + new OptionsWrapper(mvcOptions), + new OptionsWrapper(options)); + + return (provider, options); + } + + private static ApiDescriptionProviderContext CreateContext() + { + var actionDescriptor = new ControllerActionDescriptor + { + ControllerName = "Fake", + ActionName = "Get", + ControllerTypeInfo = typeof(FakeRemoteController).GetTypeInfo(), + MethodInfo = typeof(FakeRemoteController).GetMethod(nameof(FakeRemoteController.Get))!, + AttributeRouteInfo = new AttributeRouteInfo { Template = "api/fake" } + }; + + var description = new ApiDescription + { + ActionDescriptor = actionDescriptor, + HttpMethod = "GET", + RelativePath = "api/fake" + }; + + return new ApiDescriptionProviderContext(new[] { actionDescriptor }) + { + Results = { description } + }; + } + + [Fact] + public void Should_Not_Mutate_Shared_Options_On_Repeated_Calls() + { + var (provider, options) = CreateProvider(); + + provider.OnProvidersExecuting(CreateContext()); + provider.OnProvidersExecuting(CreateContext()); + provider.OnProvidersExecuting(CreateContext()); + + foreach (var template in options.SupportedResponseTypes) + { + template.ApiResponseFormats.ShouldBeEmpty(); + } + } + + [Fact] + public void Should_Add_Response_Types_With_Preserved_Template_Fields_And_Formats() + { + var options = new AbpRemoteServiceApiDescriptionProviderOptions(); + options.SupportedResponseTypes.Add(new ApiResponseType + { + Type = typeof(string), + StatusCode = 418, + Description = "I'm a teapot", + IsDefaultResponse = true + }); + + var mvcOptions = new MvcOptions(); + mvcOptions.OutputFormatters.Add(new FakeOutputFormatter()); + + var provider = new AbpRemoteServiceApiDescriptionProvider( + new EmptyModelMetadataProvider(), + new OptionsWrapper(mvcOptions), + new OptionsWrapper(options)); + + var context = CreateContext(); + provider.OnProvidersExecuting(context); + + var result = context.Results.Single(); + var added = result.SupportedResponseTypes.ShouldHaveSingleItem(); + added.StatusCode.ShouldBe(418); + added.Type.ShouldBe(typeof(string)); + added.Description.ShouldBe("I'm a teapot"); + added.IsDefaultResponse.ShouldBeTrue(); + added.ModelMetadata.ShouldNotBeNull(); + added.ApiResponseFormats.Select(x => x.MediaType) + .ShouldBe(new[] { "application/json", "text/json" }); + } + + [Fact] + public void Should_Not_Throw_Under_Concurrent_Calls() + { + var (provider, _) = CreateProvider(); + + var exception = Record.Exception(() => + Parallel.For(0, 8, _ => + { + for (var i = 0; i < 500; i++) + { + provider.OnProvidersExecuting(CreateContext()); + } + })); + + exception.ShouldBeNull(); + } + + private sealed class FakeRemoteController : IRemoteService + { + public string Get() => string.Empty; + } + + private sealed class FakeOutputFormatter : IOutputFormatter, IApiResponseTypeMetadataProvider + { + public bool CanWriteResult(OutputFormatterCanWriteContext context) => true; + + public Task WriteAsync(OutputFormatterWriteContext context) => Task.CompletedTask; + + public IReadOnlyList GetSupportedContentTypes(string? contentType, Type objectType) + => new[] { "application/json", "text/json" }; + } +} diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo/Abp/AuditLogging/EntityChange.cs b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo/Abp/AuditLogging/EntityChange.cs index dd12102e4a..f887095ad2 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo/Abp/AuditLogging/EntityChange.cs +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo/Abp/AuditLogging/EntityChange.cs @@ -47,7 +47,7 @@ public class EntityChange : Entity, IMultiTenant, IHasExtraProperties ChangeTime = entityChangeInfo.ChangeTime; ChangeType = entityChangeInfo.ChangeType; EntityTenantId = entityChangeInfo.EntityTenantId; - EntityId = entityChangeInfo.EntityId.Truncate(EntityChangeConsts.MaxEntityTypeFullNameLength); + EntityId = entityChangeInfo.EntityId.Truncate(EntityChangeConsts.MaxEntityIdLength); EntityTypeFullName = entityChangeInfo.EntityTypeFullName.TruncateFromBeginning(EntityChangeConsts.MaxEntityTypeFullNameLength); PropertyChanges = entityChangeInfo diff --git a/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IIdentityUserAppService.cs b/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IIdentityUserAppService.cs index 55946e21ab..6a175303e5 100644 --- a/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IIdentityUserAppService.cs +++ b/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IIdentityUserAppService.cs @@ -22,4 +22,6 @@ public interface IIdentityUserAppService Task FindByUsernameAsync(string userName); Task FindByEmailAsync(string email); + + Task FindByIdAsync(Guid id); } diff --git a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs b/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs index f9b5a53a46..23499937f5 100644 --- a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs +++ b/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs @@ -180,6 +180,14 @@ public class IdentityUserAppService : IdentityAppServiceBase, IIdentityUserAppSe ); } + [Authorize(IdentityPermissions.Users.Default)] + public virtual async Task FindByIdAsync(Guid id) + { + return ObjectMapper.Map( + await UserManager.FindByIdAsync(id.ToString()) + ); + } + protected virtual async Task UpdateUserByInput(IdentityUser user, IdentityUserCreateOrUpdateDtoBase input) { if (!string.Equals(user.Email, input.Email, StringComparison.InvariantCultureIgnoreCase)) diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserManager.cs b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserManager.cs index 46f7a635f0..73f997d982 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserManager.cs +++ b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserManager.cs @@ -555,22 +555,18 @@ public class IdentityUserManager : UserManager, IDomainService } else if (Options.User.AllowedUserNameCharacters.Where(char.IsDigit).Distinct().Count() >= 4) { - // The AllowedUserNameCharacters includes 4 numbers. So, we are generating 4 random numbers and appending to the username. - var numbers = Options.User.AllowedUserNameCharacters.Where(char.IsDigit).OrderBy(x => Guid.NewGuid()).Take(4).ToArray(); - var minArray = numbers.OrderBy(x => x).ToArray(); - if (minArray[0] == '0') - { - var secondItem = minArray[1]; - minArray[0] = secondItem; - minArray[1] = '0'; - } - var min = int.Parse(new string(minArray)); - var max = int.Parse(new string(numbers.OrderByDescending(x => x).ToArray())); + // The AllowedUserNameCharacters includes at least 4 distinct digits. So, we are picking 4 random digits from them and appending to the username. + var allowedDigits = Options.User.AllowedUserNameCharacters.Where(char.IsDigit).Distinct().ToArray(); tryCount = 0; do { - var randomUserName = userName + RandomHelper.GetRandom(min, max); - if ( await ValidateUserNameAsync(randomUserName)) + var randomDigits = new char[4]; + for (var i = 0; i < randomDigits.Length; i++) + { + randomDigits[i] = allowedDigits[RandomHelper.GetRandom(0, allowedDigits.Length)]; + } + var randomUserName = userName + new string(randomDigits); + if (await ValidateUserNameAsync(randomUserName)) { return randomUserName; } diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/Volo/Abp/Identity/IdentityUserClientProxy.Generated.cs b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/Volo/Abp/Identity/IdentityUserClientProxy.Generated.cs index b6e18e1e0f..11c0bb54c3 100644 --- a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/Volo/Abp/Identity/IdentityUserClientProxy.Generated.cs +++ b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/Volo/Abp/Identity/IdentityUserClientProxy.Generated.cs @@ -58,6 +58,14 @@ public partial class IdentityUserClientProxy : ClientProxyBase FindByIdAsync(Guid id) + { + return await RequestAsync(nameof(FindByIdAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); + } + public virtual async Task> GetRolesAsync(Guid id) { return await RequestAsync>(nameof(GetRolesAsync), new ClientProxyRequestTypeValue diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/identity-generate-proxy.json b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/identity-generate-proxy.json index 3937d99aa9..d66a185094 100644 --- a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/identity-generate-proxy.json +++ b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/identity-generate-proxy.json @@ -487,6 +487,23 @@ "typeSimple": "Volo.Abp.Identity.IdentityUserDto" } }, + { + "name": "FindByIdAsync", + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + } + }, { "name": "GetAsync", "parametersOnMethod": [ @@ -1019,6 +1036,43 @@ }, "allowAnonymous": null, "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" + }, + "FindByIdAsyncById": { + "uniqueName": "FindByIdAsyncById", + "name": "FindByIdAsync", + "httpMethod": "GET", + "url": "api/identity/users/by-id/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" } } }, diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/IdentityUserController.cs b/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/IdentityUserController.cs index 67039a1800..54f0fde491 100644 --- a/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/IdentityUserController.cs +++ b/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/IdentityUserController.cs @@ -53,6 +53,13 @@ public class IdentityUserController : AbpControllerBase, IIdentityUserAppService return UserAppService.DeleteAsync(id); } + [HttpGet] + [Route("by-id/{id}")] + public virtual Task FindByIdAsync(Guid id) + { + return UserAppService.FindByIdAsync(id); + } + [HttpGet] [Route("{id}/roles")] public virtual Task> GetRolesAsync(Guid id) diff --git a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/EditModal.cshtml.cs b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/EditModal.cshtml.cs index 08ea27081b..b9f89b2446 100644 --- a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/EditModal.cshtml.cs +++ b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/EditModal.cshtml.cs @@ -83,8 +83,8 @@ public class EditModalModel : IdentityPageModel return null; } - var user = await IdentityUserAppService.GetAsync(userId.Value); - return user.UserName; + var user = await IdentityUserAppService.FindByIdAsync(userId.Value); + return user?.UserName; } public virtual async Task OnPostAsync() diff --git a/modules/identity/src/Volo.Abp.Identity.Web/wwwroot/client-proxies/identity-proxy.js b/modules/identity/src/Volo.Abp.Identity.Web/wwwroot/client-proxies/identity-proxy.js index 6de3aeb8d5..b30bd0b20d 100644 --- a/modules/identity/src/Volo.Abp.Identity.Web/wwwroot/client-proxies/identity-proxy.js +++ b/modules/identity/src/Volo.Abp.Identity.Web/wwwroot/client-proxies/identity-proxy.js @@ -102,6 +102,13 @@ }, ajaxParams)); }; + volo.abp.identity.identityUser.findById = function(id, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/identity/users/by-id/' + id + '', + type: 'GET' + }, ajaxParams)); + }; + volo.abp.identity.identityUser.getRoles = function(id, ajaxParams) { return abp.ajax($.extend(true, { url: abp.appPath + 'api/identity/users/' + id + '/roles', diff --git a/modules/identity/test/Volo.Abp.Identity.Application.Tests/Volo/Abp/Identity/IdentityUserAppService_Tests.cs b/modules/identity/test/Volo.Abp.Identity.Application.Tests/Volo/Abp/Identity/IdentityUserAppService_Tests.cs index 0c1a8d6ffc..ff3c503657 100644 --- a/modules/identity/test/Volo.Abp.Identity.Application.Tests/Volo/Abp/Identity/IdentityUserAppService_Tests.cs +++ b/modules/identity/test/Volo.Abp.Identity.Application.Tests/Volo/Abp/Identity/IdentityUserAppService_Tests.cs @@ -51,6 +51,37 @@ public class IdentityUserAppService_Tests : AbpIdentityApplicationTestBase result.PhoneNumber.ShouldBe(johnNash.PhoneNumber); } + [Fact] + public async Task FindByIdAsync_Should_Return_User_When_Exists() + { + var johnNash = GetUser("john.nash"); + + var result = await _userAppService.FindByIdAsync(johnNash.Id); + + result.ShouldNotBeNull(); + result.Id.ShouldBe(johnNash.Id); + result.UserName.ShouldBe(johnNash.UserName); + } + + [Fact] + public async Task FindByIdAsync_Should_Return_Null_When_User_Does_Not_Exist() + { + var result = await _userAppService.FindByIdAsync(Guid.NewGuid()); + + result.ShouldBeNull(); + } + + [Fact] + public async Task FindByIdAsync_Should_Return_Null_When_User_Is_Soft_Deleted() + { + var johnNash = GetUser("john.nash"); + await _userAppService.DeleteAsync(johnNash.Id); + + var result = await _userAppService.FindByIdAsync(johnNash.Id); + + result.ShouldBeNull(); + } + [Fact] public async Task GetListAsync() { diff --git a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityUserManager_Tests.cs b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityUserManager_Tests.cs index 82c133e698..f027444e55 100644 --- a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityUserManager_Tests.cs +++ b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityUserManager_Tests.cs @@ -441,7 +441,7 @@ public class IdentityUserManager_Tests : AbpIdentityDomainTestBase username = await _identityUserManager.GetUserNameFromEmailAsync("admin@abp.io"); username.Length.ShouldBe(9); //admin and random 4 numbers username.ShouldContain("admin"); - Regex.IsMatch(username, @"[0-4]{3}$").ShouldBeTrue(); + Regex.IsMatch(username, @"[0-4]{4}$").ShouldBeTrue(); _identityUserManager.Options.User.AllowedUserNameCharacters = "abcdefghijklmnopqrstuvwxyz"; username = await _identityUserManager.GetUserNameFromEmailAsync("admin@abp.io"); @@ -462,6 +462,51 @@ public class IdentityUserManager_Tests : AbpIdentityDomainTestBase Regex.IsMatch(username, @"[0-9]{4}$").ShouldBeTrue(); } + [Fact] + public async Task GetUserNameFromEmailAsync_Should_Only_Use_Allowed_Digits_When_AllowedUserNameCharacters_Has_Partial_Digits() + { + _identityUserManager.Options.User.AllowedUserNameCharacters = "admin01234"; + for (var i = 0; i < 200; i++) + { + var username = await _identityUserManager.GetUserNameFromEmailAsync("admin@abp.io"); + username.Length.ShouldBe(9); + username.ShouldStartWith("admin"); + username.All(c => "admin01234".Contains(c)).ShouldBeTrue($"username '{username}' contains chars outside AllowedUserNameCharacters"); + } + } + + [Fact] + public async Task GetUserNameFromEmailAsync_Should_Only_Use_Allowed_Digits_With_Exact_Four_Digits() + { + _identityUserManager.Options.User.AllowedUserNameCharacters = "admin1234"; + for (var i = 0; i < 200; i++) + { + var username = await _identityUserManager.GetUserNameFromEmailAsync("admin@abp.io"); + username.Length.ShouldBe(9); + username.ShouldStartWith("admin"); + username.Substring(5).All(c => "1234".Contains(c)).ShouldBeTrue($"suffix of '{username}' contains chars outside the allowed digits"); + } + } + + [Fact] + public async Task GetUserNameFromEmailAsync_Should_Allow_Leading_Zero_In_Random_Digits() + { + _identityUserManager.Options.User.AllowedUserNameCharacters = "admin0123"; + var sawLeadingZero = false; + for (var i = 0; i < 100; i++) + { + var username = await _identityUserManager.GetUserNameFromEmailAsync("admin@abp.io"); + username.Length.ShouldBe(9); + username.ShouldStartWith("admin"); + username.Substring(5).All(c => "0123".Contains(c)).ShouldBeTrue($"suffix of '{username}' contains chars outside the allowed digits"); + if (username[5] == '0') + { + sawLeadingZero = true; + } + } + sawLeadingZero.ShouldBeTrue("expected at least one username with leading-zero random suffix across 100 runs"); + } + private async Task CreateRandomDefaultRoleAsync() { await _identityRoleRepository.InsertAsync( diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/SettingManagement.razor b/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/SettingManagement.razor index 74d1a50b7d..6cbbe42423 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/SettingManagement.razor +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/SettingManagement.razor @@ -44,5 +44,12 @@ } + else + { +
+ +

@L["NoSettingsAvailable"]

+
+ } diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/ar.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/ar.json index 38464ed8c0..36ec3d5ef9 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/ar.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/ar.json @@ -37,6 +37,7 @@ "Feature:SettingManagementEnableDescription": "تفعيل إعداد نظام الإدارة في التطبيق.", "Feature:AllowChangingEmailSettings": "السماح لتغيير إعدادات البريد الإلكتروني", "Feature:AllowChangingEmailSettingsDescription": "السماح لتغيير إعدادات البريد الإلكتروني.", - "SmtpPasswordPlaceholder": "أدخل قيمة لتحديث كلمة المرور" + "SmtpPasswordPlaceholder": "أدخل قيمة لتحديث كلمة المرور", + "NoSettingsAvailable": "لا توجد إعدادات لعرضها." } -} \ No newline at end of file +} diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/cs.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/cs.json index 34a9f6dd2c..d28d30e5d2 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/cs.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/cs.json @@ -37,6 +37,7 @@ "Feature:SettingManagementEnableDescription": "Povolit systém správy nastavení v aplikaci.", "Feature:AllowChangingEmailSettings": "Povolit změnu nastavení e-mailu", "Feature:AllowChangingEmailSettingsDescription": "Povolit změnu nastavení e-mailu.", - "SmtpPasswordPlaceholder": "Zadejte hodnotu pro aktualizaci hesla" + "SmtpPasswordPlaceholder": "Zadejte hodnotu pro aktualizaci hesla", + "NoSettingsAvailable": "Nejsou k dispozici žádná nastavení." } -} \ No newline at end of file +} diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/de-DE.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/de-DE.json index a2b2c9ab95..b9b5c15c70 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/de-DE.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/de-DE.json @@ -37,6 +37,7 @@ "Feature:SettingManagementEnableDescription": "Aktivieren Sie das Einstellungsverwaltungssystem in der Anwendung.", "Feature:AllowChangingEmailSettings": "Änderung der E-Mail-Einstellungen zulassen", "Feature:AllowChangingEmailSettingsDescription": "Änderung der E-Mail-Einstellungen zulassen.", - "SmtpPasswordPlaceholder": "Geben Sie einen Wert ein, um das Passwort zu aktualisieren" + "SmtpPasswordPlaceholder": "Geben Sie einen Wert ein, um das Passwort zu aktualisieren", + "NoSettingsAvailable": "Es sind keine Einstellungen anzuzeigen." } } diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/de.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/de.json index fabd73852f..b711b4e3ad 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/de.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/de.json @@ -38,6 +38,7 @@ "Feature:SettingManagementEnableDescription": "Aktivieren Sie das Einstellungsverwaltungssystem in der Anwendung.", "Feature:AllowChangingEmailSettings": "Erlauben Sie das Ändern der E-Mail-Einstellungen", "Feature:AllowChangingEmailSettingsDescription": "Erlauben Sie das Ändern der E-Mail-Einstellungen.", - "SmtpPasswordPlaceholder": "Geben Sie einen Wert ein, um das Passwort zu aktualisieren" + "SmtpPasswordPlaceholder": "Geben Sie einen Wert ein, um das Passwort zu aktualisieren", + "NoSettingsAvailable": "Es sind keine Einstellungen anzuzeigen." } -} \ No newline at end of file +} diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/el.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/el.json index 118b1664fe..e97871d303 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/el.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/el.json @@ -33,6 +33,7 @@ "Feature:SettingManagementEnableDescription": "Ενεργοποίηση συστήματος διαχείρισης ρυθμίσεων στην εφαρμογή.", "Feature:AllowChangingEmailSettings": "Επιτρέψτε την αλλαγή των ρυθμίσεων email", "Feature:AllowChangingEmailSettingsDescription": "Επιτρέψτε την αλλαγή των ρυθμίσεων email.", - "SmtpPasswordPlaceholder": "Εισαγάγετε μια τιμή για ενημέρωση κωδικού πρόσβασης" + "SmtpPasswordPlaceholder": "Εισαγάγετε μια τιμή για ενημέρωση κωδικού πρόσβασης", + "NoSettingsAvailable": "Δεν υπάρχουν ρυθμίσεις για εμφάνιση." } } diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/en-GB.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/en-GB.json index 6284af2e2f..5a7dfa2c20 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/en-GB.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/en-GB.json @@ -2,6 +2,7 @@ "culture": "en-GB", "texts": { "Settings": "Settings", - "SavedSuccessfully": "Saved successfully" + "SavedSuccessfully": "Saved successfully", + "NoSettingsAvailable": "There are no settings to display." } -} \ No newline at end of file +} diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/en.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/en.json index cffd6f27cd..0681e3a9cb 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/en.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/en.json @@ -37,6 +37,7 @@ "Feature:SettingManagementEnableDescription": "Enable setting management system in the application.", "Feature:AllowChangingEmailSettings": "Allow changing email settings", "Feature:AllowChangingEmailSettingsDescription": "Allow changing email settings.", - "SmtpPasswordPlaceholder": "Enter a value to update password" + "SmtpPasswordPlaceholder": "Enter a value to update password", + "NoSettingsAvailable": "There are no settings to display." } } diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/es.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/es.json index f158ec3b0d..b6f71d89ee 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/es.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/es.json @@ -37,6 +37,7 @@ "Feature:SettingManagementEnableDescription": "Habilite el sistema de gestión de la configuración en la aplicación.", "Feature:AllowChangingEmailSettings": "Permitir cambiar la configuración de correo electrónico", "Feature:AllowChangingEmailSettingsDescription": "Permitir cambiar la configuración de correo electrónico.", - "SmtpPasswordPlaceholder": "Ingrese un valor para actualizar la contraseña" + "SmtpPasswordPlaceholder": "Ingrese un valor para actualizar la contraseña", + "NoSettingsAvailable": "No hay ajustes para mostrar." } -} \ No newline at end of file +} diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/fa.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/fa.json index 800ac04a66..af9e74cdb5 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/fa.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/fa.json @@ -18,6 +18,7 @@ "DefaultFromDisplayName": "نام نمایشی ارسال کننده پیش فرض", "Feature:SettingManagementGroup": "تنظیمات مدیریت", "Feature:SettingManagementEnable": "فعال کردن مدیریت تنظیمات", - "Feature:SettingManagementEnableDescription": "سیستم مدیریت تنظیمات را در برنامه فعال کنید." + "Feature:SettingManagementEnableDescription": "سیستم مدیریت تنظیمات را در برنامه فعال کنید.", + "NoSettingsAvailable": "تنظیماتی برای نمایش وجود ندارد." } -} \ No newline at end of file +} diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/fi.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/fi.json index a2062743fd..a9cdd907cf 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/fi.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/fi.json @@ -37,6 +37,7 @@ "Feature:SettingManagementEnableDescription": "Ota asetustenhallintajärjestelmä käyttöön sovelluksessa.", "Feature:AllowChangingEmailSettings": "Salli sähköpostiasetusten muuttaminen", "Feature:AllowChangingEmailSettingsDescription": "Salli sähköpostiasetusten muuttaminen.", - "SmtpPasswordPlaceholder": "Syötä arvo päivittääksesi salasana" + "SmtpPasswordPlaceholder": "Syötä arvo päivittääksesi salasana", + "NoSettingsAvailable": "Näytettäviä asetuksia ei ole." } -} \ No newline at end of file +} diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/fr.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/fr.json index 957ff62a19..e28808ac59 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/fr.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/fr.json @@ -37,6 +37,7 @@ "Feature:SettingManagementEnableDescription": "Activer le système de gestion des paramètres dans l'application.", "Feature:AllowChangingEmailSettings": "Autoriser la modification des paramètres de messagerie", "Feature:AllowChangingEmailSettingsDescription": "Autoriser la modification des paramètres de messagerie.", - "SmtpPasswordPlaceholder": "Entrez une valeur pour mettre à jour le mot de passe" + "SmtpPasswordPlaceholder": "Entrez une valeur pour mettre à jour le mot de passe", + "NoSettingsAvailable": "Aucun paramètre à afficher." } -} \ No newline at end of file +} diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/hi.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/hi.json index 8c00ffca0d..e25c3710ec 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/hi.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/hi.json @@ -37,6 +37,7 @@ "Feature:SettingManagementEnableDescription": "एप्लिकेशन में सेटिंग प्रबंधन प्रणाली सक्षम करें।", "Feature:AllowChangingEmailSettings": "ईमेल सेटिंग्स बदलने की अनुमति दें।", "Feature:AllowChangingEmailSettingsDescription": "ईमेल सेटिंग्स बदलने की अनुमति दें।", - "SmtpPasswordPlaceholder": "पासवर्ड अपडेट करने के लिए एक मान दर्ज करें" + "SmtpPasswordPlaceholder": "पासवर्ड अपडेट करने के लिए एक मान दर्ज करें", + "NoSettingsAvailable": "दिखाने के लिए कोई सेटिंग नहीं है।" } -} \ No newline at end of file +} diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/hr.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/hr.json index 1e68c9ad7e..69c3b931db 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/hr.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/hr.json @@ -38,6 +38,7 @@ "Feature:SettingManagementEnableDescription": "Omogućite sustav upravljanja postavkama u aplikaciji.", "Feature:AllowChangingEmailSettings": "Dopusti promjenu postavki e-pošte", "Feature:AllowChangingEmailSettingsDescription": "Dopusti promjenu postavki e-pošte.", - "SmtpPasswordPlaceholder": "Unesite vrijednost za ažuriranje lozinke" + "SmtpPasswordPlaceholder": "Unesite vrijednost za ažuriranje lozinke", + "NoSettingsAvailable": "Nema postavki za prikaz." } -} \ No newline at end of file +} diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/hu.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/hu.json index 43b8a53593..7b4dd904ae 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/hu.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/hu.json @@ -37,6 +37,7 @@ "Feature:SettingManagementEnableDescription": "A beállításkezelő rendszer engedélyezése az alkalmazásban.", "Feature:AllowChangingEmailSettings": "Az e-mail beállítások módosításának engedélyezése", "Feature:AllowChangingEmailSettingsDescription": "Az e-mail beállítások módosításának engedélyezése.", - "SmtpPasswordPlaceholder": "Adjon meg egy értéket a jelszó frissítéséhez" + "SmtpPasswordPlaceholder": "Adjon meg egy értéket a jelszó frissítéséhez", + "NoSettingsAvailable": "Nincs megjeleníthető beállítás." } -} \ No newline at end of file +} diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/is.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/is.json index 69a437b66e..475546fc52 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/is.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/is.json @@ -37,6 +37,7 @@ "Feature:SettingManagementEnableDescription": "Virkja stillingar í forritinu.", "Feature:AllowChangingEmailSettings": "Leyfa að breyta stillingum tölvupósts", "Feature:AllowChangingEmailSettingsDescription": "Leyfa að breyta stillingum tölvupósts.", - "SmtpPasswordPlaceholder": "Sláðu inn gildi til að uppfæra lykilorð" + "SmtpPasswordPlaceholder": "Sláðu inn gildi til að uppfæra lykilorð", + "NoSettingsAvailable": "Engar stillingar til að sýna." } -} \ No newline at end of file +} diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/it.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/it.json index 01f80cecfb..a1eaf443ff 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/it.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/it.json @@ -37,6 +37,7 @@ "Feature:SettingManagementEnableDescription": "Abilita sistema gestione impostazioni nell'applicazione", "Feature:AllowChangingEmailSettings": "Consenti di modificare le loro impostazioni e-mail", "Feature:AllowChangingEmailSettingsDescription": "Consenti di modificare le loro impostazioni e-mail.", - "SmtpPasswordPlaceholder": "Inserisci un valore per aggiornare la password" + "SmtpPasswordPlaceholder": "Inserisci un valore per aggiornare la password", + "NoSettingsAvailable": "Non ci sono impostazioni da visualizzare." } -} \ No newline at end of file +} diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/nl.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/nl.json index 57a87f550b..d172a031d9 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/nl.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/nl.json @@ -37,6 +37,7 @@ "Feature:SettingManagementEnableDescription": "Schakel het instellingsbeheersysteem in de toepassing in.", "Feature:AllowChangingEmailSettings": "Toestaan om e-mailinstellingen te wijzigen", "Feature:AllowChangingEmailSettingsDescription": "Toestaan om e-mailinstellingen te wijzigen.", - "SmtpPasswordPlaceholder": "Voer een waarde in om het wachtwoord bij te werken" + "SmtpPasswordPlaceholder": "Voer een waarde in om het wachtwoord bij te werken", + "NoSettingsAvailable": "Er zijn geen instellingen om weer te geven." } -} \ No newline at end of file +} diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/pl-PL.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/pl-PL.json index 28c8dd3689..e452b646f2 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/pl-PL.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/pl-PL.json @@ -37,6 +37,7 @@ "Feature:SettingManagementEnableDescription": "Włącz system zarządzania ustawieniami w aplikacji.", "Feature:AllowChangingEmailSettings": "Zezwól na zmianę ustawień poczty e-mail", "Feature:AllowChangingEmailSettingsDescription": "Zezwól na zmianę ustawień poczty e-mail.", - "SmtpPasswordPlaceholder": "Wprowadź wartość, aby zaktualizować hasło" + "SmtpPasswordPlaceholder": "Wprowadź wartość, aby zaktualizować hasło", + "NoSettingsAvailable": "Brak ustawień do wyświetlenia." } -} \ No newline at end of file +} diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/pt-BR.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/pt-BR.json index 8b968bacfe..0485d4c9c2 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/pt-BR.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/pt-BR.json @@ -37,6 +37,7 @@ "Feature:SettingManagementEnableDescription": "Habilite o sistema de gerenciamento de configuração no aplicativo.", "Feature:AllowChangingEmailSettings": "Permitir alterar as configurações de e-mail", "Feature:AllowChangingEmailSettingsDescription": "Permitir alterar as configurações de e-mail.", - "SmtpPasswordPlaceholder": "Digite um valor para atualizar a senha" + "SmtpPasswordPlaceholder": "Digite um valor para atualizar a senha", + "NoSettingsAvailable": "Não há configurações para exibir." } -} \ No newline at end of file +} diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/ro-RO.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/ro-RO.json index 83a9b3e2dc..a325164f39 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/ro-RO.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/ro-RO.json @@ -37,6 +37,7 @@ "Feature:SettingManagementEnableDescription": "Activează sistemul de administrare a setărilor în aplicaţie.", "Feature:AllowChangingEmailSettings": "Permiteți modificarea setărilor de e-mail", "Feature:AllowChangingEmailSettingsDescription": "Permiteți modificarea setărilor de e-mail.", - "SmtpPasswordPlaceholder": "Introduceți o valoare pentru a actualiza parola" + "SmtpPasswordPlaceholder": "Introduceți o valoare pentru a actualiza parola", + "NoSettingsAvailable": "Nu există setări de afișat." } -} \ No newline at end of file +} diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/ru.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/ru.json index 7026026918..7764d3a320 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/ru.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/ru.json @@ -37,6 +37,7 @@ "Feature:SettingManagementEnableDescription": "Включите систему управления настройками в приложении.", "Feature:AllowChangingEmailSettings": "Разрешить изменение настроек электронной почты", "Feature:AllowChangingEmailSettingsDescription": "Разрешить изменение настроек электронной почты.", - "SmtpPasswordPlaceholder": "Введите значение для обновления пароля" + "SmtpPasswordPlaceholder": "Введите значение для обновления пароля", + "NoSettingsAvailable": "Нет настроек для отображения." } -} \ No newline at end of file +} diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/sk.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/sk.json index 9e4ef99363..7d83c646f1 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/sk.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/sk.json @@ -37,6 +37,7 @@ "Feature:SettingManagementEnableDescription": "Povoliť systém správy nastavení v aplikácii.", "Feature:AllowChangingEmailSettings": "Povoliť zmenu nastavení e-mailu", "Feature:AllowChangingEmailSettingsDescription": "Povoliť zmenu nastavení e-mailu.", - "SmtpPasswordPlaceholder": "Zadajte hodnotu pre aktualizáciu hesla" + "SmtpPasswordPlaceholder": "Zadajte hodnotu pre aktualizáciu hesla", + "NoSettingsAvailable": "Nie sú k dispozícii žiadne nastavenia." } -} \ No newline at end of file +} diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/sl.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/sl.json index e1cce43730..95bd7c7fe5 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/sl.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/sl.json @@ -37,6 +37,7 @@ "Feature:SettingManagementEnableDescription": "Omogočite nastavitev sistema upravljanja v aplikaciji.", "Feature:AllowChangingEmailSettings": "Dovoli spreminjanje e-poštnih nastavitev", "Feature:AllowChangingEmailSettingsDescription": "Dovoli spreminjanje e-poštnih nastavitev.", - "SmtpPasswordPlaceholder": "Vnesite vrednost za posodobitev gesla" + "SmtpPasswordPlaceholder": "Vnesite vrednost za posodobitev gesla", + "NoSettingsAvailable": "Ni nastavitev za prikaz." } -} \ No newline at end of file +} diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/sv.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/sv.json index 95462e08b7..1ffdace684 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/sv.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/sv.json @@ -36,6 +36,7 @@ "Feature:SettingManagementEnableDescription": "Aktivera inställningshanteringssystem i applikationen.", "Feature:AllowChangingEmailSettings": "Tillåt ändring av e-postinställningar", "Feature:AllowChangingEmailSettingsDescription": "Tillåt ändring av e-postinställningar.", - "SmtpPasswordPlaceholder": "Ange ett värde för att uppdatera lösenordet" + "SmtpPasswordPlaceholder": "Ange ett värde för att uppdatera lösenordet", + "NoSettingsAvailable": "Det finns inga inställningar att visa." } -} \ No newline at end of file +} diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/tr.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/tr.json index 8a2db80e58..ed30fc5937 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/tr.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/tr.json @@ -37,6 +37,7 @@ "Feature:SettingManagementEnableDescription": "Uygulamada ayar yönetim sistemini etkinleştirin.", "Feature:AllowChangingEmailSettings": "E-posta ayarlarını değiştirmeye izin verin", "Feature:AllowChangingEmailSettingsDescription": "E-posta ayarlarını değiştirmeye izin verin.", - "SmtpPasswordPlaceholder": "Şifreyi güncellemek için bir değer girin" + "SmtpPasswordPlaceholder": "Şifreyi güncellemek için bir değer girin", + "NoSettingsAvailable": "Görüntülenecek ayar yok." } } diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/vi.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/vi.json index 4c4f74ec2c..a9fb2f391f 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/vi.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/vi.json @@ -37,6 +37,7 @@ "Feature:SettingManagementEnableDescription": "Bật cài đặt hệ thống quản lý trong ứng dụng.", "Feature:AllowChangingEmailSettings": "Cho phép thay đổi cài đặt email", "Feature:AllowChangingEmailSettingsDescription": "Cho phép thay đổi cài đặt email.", - "SmtpPasswordPlaceholder": "Nhập một giá trị để cập nhật mật khẩu" + "SmtpPasswordPlaceholder": "Nhập một giá trị để cập nhật mật khẩu", + "NoSettingsAvailable": "Không có cài đặt nào để hiển thị." } -} \ No newline at end of file +} diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/zh-Hans.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/zh-Hans.json index 392eb7e4e9..d78697e880 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/zh-Hans.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/zh-Hans.json @@ -37,6 +37,7 @@ "Feature:SettingManagementEnableDescription": "在应用程序中启用设置管理系统。", "Feature:AllowChangingEmailSettings": "允许更改邮件设置", "Feature:AllowChangingEmailSettingsDescription": "允许更改邮件设置。", - "SmtpPasswordPlaceholder": "输入一个值以更新密码" + "SmtpPasswordPlaceholder": "输入一个值以更新密码", + "NoSettingsAvailable": "没有可显示的设置。" } -} \ No newline at end of file +} diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/zh-Hant.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/zh-Hant.json index 3dea507456..74b6dc03e9 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/zh-Hant.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/zh-Hant.json @@ -37,6 +37,7 @@ "Feature:SettingManagementEnableDescription": "在應用程序中啟用設定管理系統.", "Feature:AllowChangingEmailSettings": "允許更改電子郵件設置", "Feature:AllowChangingEmailSettingsDescription": "允許更改電子郵件設置。", - "SmtpPasswordPlaceholder": "輸入一個值以更新密碼" + "SmtpPasswordPlaceholder": "輸入一個值以更新密碼", + "NoSettingsAvailable": "沒有可顯示的設定。" } } diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Pages/SettingManagement/Index.cshtml b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Pages/SettingManagement/Index.cshtml index b259131ec7..25eff5c498 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Pages/SettingManagement/Index.cshtml +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Pages/SettingManagement/Index.cshtml @@ -25,24 +25,34 @@
-
-
- -
-
-
+ @if (Model.SettingPageCreationContext.Groups.Count > 0) + { +
+
+ +
+
+
+
-
+ } + else + { +
+ +

@L["NoSettingsAvailable"]

+
+ }
diff --git a/npm/ng-packs/packages/setting-management/src/lib/components/setting-management.component.html b/npm/ng-packs/packages/setting-management/src/lib/components/setting-management.component.html index 07830f2d1f..35241930a3 100644 --- a/npm/ng-packs/packages/setting-management/src/lib/components/setting-management.component.html +++ b/npm/ng-packs/packages/setting-management/src/lib/components/setting-management.component.html @@ -2,28 +2,33 @@
-
-
-