From 4f1822c397233c3d60ba7e7e03b1b1a58f54ac76 Mon Sep 17 00:00:00 2001 From: enisn Date: Mon, 4 Jul 2022 10:54:52 +0300 Subject: [PATCH 1/7] Update theme.css --- .../wwwroot/libs/abp/css/theme.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/wwwroot/libs/abp/css/theme.css b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/wwwroot/libs/abp/css/theme.css index 6aee7a5ba7..db728eed11 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/wwwroot/libs/abp/css/theme.css +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/wwwroot/libs/abp/css/theme.css @@ -169,4 +169,10 @@ div.dataTables_wrapper div.dataTables_length label { } } +h1.content-header-title{ + font-size: 1.5rem; +} +.b-table h4.h4 { + text-align: center; +} \ No newline at end of file From 016d32b13c7eb38a28b49d7a06234e8281a3e842 Mon Sep 17 00:00:00 2001 From: Engincan VESKE Date: Sat, 9 Jul 2022 10:01:04 +0300 Subject: [PATCH 2/7] Update "swagger hide endpoints" article --- .../POST.md | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/docs/en/Community-Articles/2022-02-06-How-to-Hide-ABP-Related-Endpoints-on-Swagger-UI/POST.md b/docs/en/Community-Articles/2022-02-06-How-to-Hide-ABP-Related-Endpoints-on-Swagger-UI/POST.md index 056c14c6e7..a6ad7596d4 100644 --- a/docs/en/Community-Articles/2022-02-06-How-to-Hide-ABP-Related-Endpoints-on-Swagger-UI/POST.md +++ b/docs/en/Community-Articles/2022-02-06-How-to-Hide-ABP-Related-Endpoints-on-Swagger-UI/POST.md @@ -425,4 +425,26 @@ That's it. Now we can open the Setting Management page and enable/disable the sw ![](./swagger-hide-endpoints.gif) -Thanks for reading. +--- + +## July 2022 Update + +With ABP v5.2+, there is a built-in option to hide/show ABP related endpoints on runtime. To hide ABP's default endpoints, call the `HideAbpEndpoints` method in your Swagger configuration as below: + +```csharp +services.AddAbpSwaggerGen( + options => + { + //... other options + + //Hides ABP Related endpoints on Swagger UI + options.HideAbpEndpoints(); + } +) +``` + +> For more info, please see the [Swagger Integration](https://docs.abp.io/en/abp/latest/API/Swagger-Integration#hide-abp-endpoints-on-swagger-ui) docs. + +--- + +Thanks for reading. \ No newline at end of file From c5016265dec9e6c6ee57a199318054c5e8a4c6f4 Mon Sep 17 00:00:00 2001 From: Maik Stegemann Date: Mon, 11 Jul 2022 12:28:10 +0200 Subject: [PATCH 3/7] fix encoding --- .../docs/src/Volo.Docs.Web/HtmlConverting/HtmlNormalizer.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/docs/src/Volo.Docs.Web/HtmlConverting/HtmlNormalizer.cs b/modules/docs/src/Volo.Docs.Web/HtmlConverting/HtmlNormalizer.cs index adfe196723..f6435b81aa 100644 --- a/modules/docs/src/Volo.Docs.Web/HtmlConverting/HtmlNormalizer.cs +++ b/modules/docs/src/Volo.Docs.Web/HtmlConverting/HtmlNormalizer.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Text; using System.Text.RegularExpressions; +using System.Web; using Volo.Docs.Utils; namespace Volo.Docs.HtmlConverting @@ -26,7 +27,7 @@ namespace Volo.Docs.HtmlConverting (localDirectory.IsNullOrEmpty() ? "" : localDirectory.TrimStart('/').EnsureEndsWith('/')) + match.Groups[2].Value.TrimStart('/'); - return match.Groups[1] + " src=\"" + newImageSource + "\" " + match.Groups[3]; + return match.Groups[1] + " src=\"" + HttpUtility.HtmlEncode(newImageSource) + "\" " + match.Groups[3]; }, RegexOptions.IgnoreCase | RegexOptions.Singleline | RegexOptions.Multiline); From 9be9141f406e23161b9ba729d5c83c948fa32a4f Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Tue, 12 Jul 2022 11:49:04 +0800 Subject: [PATCH 4/7] Remove duplicate resources --- .../Volo/Abp/IdentityServer/ResourceStore.cs | 16 ++++++++-------- .../IdentityServer/ResourceStore_Cache_Tests.cs | 2 +- .../AbpIdentityServerTestDataBuilder.cs | 1 + 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ResourceStore.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ResourceStore.cs index d24d7e31c9..51862d7597 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ResourceStore.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ResourceStore.cs @@ -61,14 +61,14 @@ public class ResourceStore : IResourceStore /// public virtual async Task> FindIdentityResourcesByScopeNameAsync(IEnumerable scopeNames) { - return await GetCacheItemsAsync( + return (await GetCacheItemsAsync( IdentityResourceCache, scopeNames, async keys => await IdentityResourceRepository.GetListByScopeNameAsync(keys, includeDetails: true), (models, cacheKeyPrefix) => new List>> { models.Select(x => new KeyValuePair(AddCachePrefix(x.Name, cacheKeyPrefix), x)) - }); + })).DistinctBy(x => x.Name); } /// @@ -76,14 +76,14 @@ public class ResourceStore : IResourceStore /// public virtual async Task> FindApiScopesByNameAsync(IEnumerable scopeNames) { - return await GetCacheItemsAsync( + return (await GetCacheItemsAsync( ApiScopeCache, scopeNames, async keys => await ApiScopeRepository.GetListByNameAsync(keys, includeDetails: true), (models, cacheKeyPrefix) => new List>> { models.Select(x => new KeyValuePair(AddCachePrefix(x.Name, cacheKeyPrefix), x)) - }); + })).DistinctBy(x => x.Name); } /// @@ -91,7 +91,7 @@ public class ResourceStore : IResourceStore /// public virtual async Task> FindApiResourcesByScopeNameAsync(IEnumerable scopeNames) { - return await GetCacheItemsAsync( + return (await GetCacheItemsAsync( ApiResourceCache, scopeNames, async keys => await ApiResourceRepository.GetListByScopesAsync(keys, includeDetails: true), @@ -100,7 +100,7 @@ public class ResourceStore : IResourceStore return models .Select(model => model.Scopes.Select(scope => new KeyValuePair(AddCachePrefix(scope, cacheKeyPrefix), model)).ToList()) .Where(scopes => scopes.Any()).Cast>>().ToList(); - }, ApiResourceScopeNameCacheKeyPrefix); + }, ApiResourceScopeNameCacheKeyPrefix)).DistinctBy(x => x.Name); } /// @@ -108,14 +108,14 @@ public class ResourceStore : IResourceStore /// public virtual async Task> FindApiResourcesByNameAsync(IEnumerable apiResourceNames) { - return await GetCacheItemsAsync( + return (await GetCacheItemsAsync( ApiResourceCache, apiResourceNames, async keys => await ApiResourceRepository.FindByNameAsync(keys, includeDetails: true), (models, cacheKeyPrefix) => new List>> { models.Select(x => new KeyValuePair(AddCachePrefix(x.Name, cacheKeyPrefix), x)) - }, ApiResourceNameCacheKeyPrefix); + }, ApiResourceNameCacheKeyPrefix)).DistinctBy(x => x.Name); } /// diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/ResourceStore_Cache_Tests.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/ResourceStore_Cache_Tests.cs index dbc77425af..b33b8aa580 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/ResourceStore_Cache_Tests.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/ResourceStore_Cache_Tests.cs @@ -54,7 +54,7 @@ public class ResourceStore_Cache_Tests : AbpIdentityServerDomainTestBase apiResources1.Count.ShouldBe(1); apiResources1.First().Name.ShouldBe("Test-ApiResource-Name-1"); - var apiResources2 = (await _resourceStore.FindApiResourcesByScopeNameAsync(new[] { "Test-ApiResource-ApiScope-Name-1", nameof(ApiResourceScope.Scope) })).ToList(); + var apiResources2 = (await _resourceStore.FindApiResourcesByScopeNameAsync(new[] { "Test-ApiResource-ApiScope-Name-1", "Test-ApiResource-ApiScope-Name-2", nameof(ApiResourceScope.Scope) })).ToList(); apiResources2.ShouldNotBeEmpty(); apiResources2.Count.ShouldBe(2); apiResources2.ShouldContain(x => x.Name == "Test-ApiResource-Name-1"); diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs index 64c6f09209..eaf8aabf58 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs @@ -103,6 +103,7 @@ public class AbpIdentityServerTestDataBuilder : ITransientDependency apiResource2.AddSecret("secret".Sha256()); apiResource2.AddScope("Test-ApiResource-ApiScope-Name-1"); + apiResource2.AddScope("Test-ApiResource-ApiScope-Name-2"); apiResource2.AddScope("Test-ApiResource-ApiScope-DisplayName-1"); apiResource2.AddUserClaim("Test-ApiResource-Claim-Type-1"); From 80e96ea7fc58f756b9a54ec0eca15bac571a147a Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Tue, 12 Jul 2022 12:18:33 +0800 Subject: [PATCH 5/7] Update unit test --- .../Abp/IdentityServer/Clients/IdentityResourceStore_Tests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/IdentityResourceStore_Tests.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/IdentityResourceStore_Tests.cs index 7d946b012c..c54c99e88d 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/IdentityResourceStore_Tests.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/IdentityResourceStore_Tests.cs @@ -53,7 +53,7 @@ public class IdentityResourceStore_Tests : AbpIdentityServerTestBase //Assert apiResources.ShouldNotBe(null); - apiResources[0].Scopes.Count.ShouldBe(3); + apiResources[0].Scopes.Count.ShouldBe(4); } [Fact] From ab1eacf824be3956abaed0314923caf7951dbf96 Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 12 Jul 2022 14:21:23 +0800 Subject: [PATCH 6/7] Update Getting-Started-AspNetCore-Application.md --- docs/en/Getting-Started-AspNetCore-Application.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/en/Getting-Started-AspNetCore-Application.md b/docs/en/Getting-Started-AspNetCore-Application.md index 0ccd900b1f..c7f329878c 100644 --- a/docs/en/Getting-Started-AspNetCore-Application.md +++ b/docs/en/Getting-Started-AspNetCore-Application.md @@ -77,7 +77,7 @@ using BasicAspNetCoreApplication; var builder = WebApplication.CreateBuilder(args); -await builder.Services.AddApplicationAsync(); +await builder.AddApplicationAsync(); var app = builder.Build(); @@ -85,7 +85,7 @@ await app.InitializeApplicationAsync(); await app.RunAsync(); ```` -``builder.Services.AddApplicationAsync();`` adds all services defined in all modules starting from the ``AppModule``. +``builder.AddApplicationAsync();`` adds all services defined in all modules starting from the ``AppModule``. ``app.InitializeApplicationAsync()`` initializes and starts the application. @@ -125,7 +125,7 @@ var builder = WebApplication.CreateBuilder(args); builder.Host.UseAutofac(); //Add this line -await builder.Services.AddApplicationAsync(); +await builder.AddApplicationAsync(); var app = builder.Build(); From fc0e72f7ad9eaa00b7ddf6bea9f59929e0b88a83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arma=C4=9Fan=20=C3=9Cnl=C3=BC?= <36102404+armgnunlu@users.noreply.github.com> Date: Wed, 13 Jul 2022 09:47:56 +0300 Subject: [PATCH 7/7] Update theme.css --- .../wwwroot/libs/abp/css/theme.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/wwwroot/libs/abp/css/theme.css b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/wwwroot/libs/abp/css/theme.css index db728eed11..c10092d28f 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/wwwroot/libs/abp/css/theme.css +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/wwwroot/libs/abp/css/theme.css @@ -170,9 +170,9 @@ div.dataTables_wrapper div.dataTables_length label { } h1.content-header-title{ - font-size: 1.5rem; + font-size: 1.5em; } .b-table h4.h4 { text-align: center; -} \ No newline at end of file +}