diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json index f298592477..be193b7396 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json @@ -29,15 +29,15 @@ "Authorization": "Authorization", "AuthorizationExplanation": "Advanced authorization with user, role and fine-grained permission system. Built on the Microsoft Identity library.", "MultiTenancy": "Multi-Tenancy", - "MultiTenancyExplanation": "SaaS applications made easy! Integrated multi-tenancy from database to UI.", + "MultiTenancyExplanationShort": "SaaS applications made easy! Integrated multi-tenancy from database to UI.", "CrossCuttingConcerns": "Cross Cutting Concerns", - "CrossCuttingConcernsExplanation": "Complete infrastructure for authorization, validation, exception handling, caching, audit logging, transaction management and so on.", + "CrossCuttingConcernsExplanationShort": "Complete infrastructure for authorization, validation, exception handling, caching, audit logging, transaction management and so on.", "BuiltInBundlingMinification": "Built-In Bundling & Minification", "BuiltInBundlingMinificationExplanation": "Stop to use external tools for bundling & minification. ABP offers a simpler, dynamic, powerful, modular and built-in way!", "VirtualFileSystem": "Virtual File System", "VirtualFileSystemExplanation": "Embed views, scripts, styles, images... into packages/libraries and reuse in different applications.", "Theming": "Theming", - "ThemingExplanation": "Use and customize the bootstrap-based standard UI theme or create your own one.", + "ThemingExplanationShort": "Use and customize the bootstrap-based standard UI theme or create your own one.", "BootstrapTagHelpersDynamicForms": "Bootstrap Tag Helpers & Dynamic Forms", "BootstrapTagHelpersDynamicFormsExplanation": "Built-in background job system that can be integrated to Hangfire, RabbitMQ or any tool you like.", //TODO explanation doesn't match. "HTTPAPIsDynamicProxies": "HTTP APIs & Dynamic Proxies", @@ -100,7 +100,6 @@ "DistributedEventBus": "Distributed Event Bus", "DistributedEventBusWithRabbitMQIntegration": "Distributed Event Bus with RabbitMQ Integration", "TestInfrastructure": "Test Infrastructure", - "AuditLogging": "Audit Logging", "AuditLoggingEntityHistories": "Audit Logging & Entity Histories", "ObjectToObjectMapping": "Object to Object Mapping", "EmailSMSAbstractions": "Email & SMS Abstractions", diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/zh-Hans.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/zh-Hans.json index a0a3ff0d40..b545cd8e16 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/zh-Hans.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/zh-Hans.json @@ -29,15 +29,15 @@ "Authorization": "授权", "AuthorizationExplanation": "具有用户,角色和细粒度权限系统的高级授权. 建立在Microsoft Identity库上.", "MultiTenancy": "多租户", - "MultiTenancyExplanation": "SaaS应用程序变得简单! 从数据库到UI的多租户集成.", + "MultiTenancyExplanationShort": "SaaS应用程序变得简单! 从数据库到UI的多租户集成.", "CrossCuttingConcerns": "横切关注点", - "CrossCuttingConcernsExplanation": "完整的基础架构,用于授权,验证,异常处理,缓存,审计日志记录,事务管理等.", + "CrossCuttingConcernsExplanationShort": "完整的基础架构,用于授权,验证,异常处理,缓存,审计日志记录,事务管理等.", "BuiltInBundlingMinification": "内置Bundling & Minification", "BuiltInBundlingMinificationExplanation": "无需使用外部工具进行Bundling & Minification. ABP提供了一种更简单,动态,功能强大,模块化和内置的方式!", "VirtualFileSystem": "虚拟文件系统", "VirtualFileSystemExplanation": "将视图,脚本,样式,图像...嵌入到包/库中,并在不同的应用程序中重复使用.", "Theming": "主题", - "ThemingExplanation": "使用和定制基于bootstrap的标准UI主题,或创建自己的主题.", + "ThemingExplanationShort": "使用和定制基于bootstrap的标准UI主题,或创建自己的主题.", "BootstrapTagHelpersDynamicForms": "Bootstrap Tag Helpers和动态表单", "BootstrapTagHelpersDynamicFormsExplanation": "内置的后台作业系统可以集成到Hangfire,RabbitMQ或您喜欢的任何工具中.", //TODO explanation doesn't match. "HTTPAPIsDynamicProxies": "HTTP APIs和动态代理", @@ -100,7 +100,6 @@ "DistributedEventBus": "分布式事件总线", "DistributedEventBusWithRabbitMQIntegration": "具有RabbitMQ集成的分布式事件总线", "TestInfrastructure": "测试基础设施", - "AuditLogging": "审计日志", "AuditLoggingEntityHistories": "审计日志和实体历史", "ObjectToObjectMapping": "对象映射", "EmailSMSAbstractions": "电子邮件和短信抽象", diff --git a/docs/en/Getting-Started-AspNetCore-Application.md b/docs/en/Getting-Started-AspNetCore-Application.md index f0a715aacd..4abcd039c9 100644 --- a/docs/en/Getting-Started-AspNetCore-Application.md +++ b/docs/en/Getting-Started-AspNetCore-Application.md @@ -14,7 +14,7 @@ This tutorial explains how to start ABP from scratch with minimal dependencies. 3. Press to the create button: -![create-aspnet-core-application](D:\Github\abp\docs\en\images\create-aspnet-core-application.png) +![create-aspnet-core-application](images/create-aspnet-core-application.png) ## Install Volo.Abp.AspNetCore.Mvc Package diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs index e30ed7a77f..3bebf3103a 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs @@ -71,18 +71,13 @@ namespace Volo.Abp.Cli.Commands } var outputFolder = commandLineArgs.Options.GetOrNull(Options.OutputFolder.Short, Options.OutputFolder.Long); - if (outputFolder != null) - { - if (!Directory.Exists(outputFolder)) - { - Directory.CreateDirectory(outputFolder); - } - outputFolder = Path.GetFullPath(outputFolder); - } - else + outputFolder = Path.Combine(outputFolder != null ? Path.GetFullPath(outputFolder) : Directory.GetCurrentDirectory(), + SolutionName.Parse(commandLineArgs.Target).FullName); + + if (!Directory.Exists(outputFolder)) { - outputFolder = Directory.GetCurrentDirectory(); + Directory.CreateDirectory(outputFolder); } Logger.LogInformation("Output folder: " + outputFolder); diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs index 3d4b45d75d..0d45d719fd 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs @@ -224,15 +224,15 @@ namespace Volo.Abp.EntityFrameworkCore return; } - var localEvents = generatesDomainEventsEntity.GetLocalEvents().ToArray(); - if (localEvents.Any()) + var localEvents = generatesDomainEventsEntity.GetLocalEvents()?.ToArray(); + if (localEvents != null && localEvents.Any()) { changeReport.DomainEvents.AddRange(localEvents.Select(eventData => new DomainEventEntry(entityAsObj, eventData))); generatesDomainEventsEntity.ClearLocalEvents(); } - var distributedEvents = generatesDomainEventsEntity.GetDistributedEvents().ToArray(); - if (distributedEvents.Any()) + var distributedEvents = generatesDomainEventsEntity.GetDistributedEvents()?.ToArray(); + if (distributedEvents != null && distributedEvents.Any()) { changeReport.DistributedEvents.AddRange(distributedEvents.Select(eventData => new DomainEventEntry(entityAsObj, eventData))); generatesDomainEventsEntity.ClearDistributedEvents(); diff --git a/framework/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/MongoDbRepository.cs b/framework/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/MongoDbRepository.cs index deca912bec..057f72bbb5 100644 --- a/framework/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/MongoDbRepository.cs +++ b/framework/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/MongoDbRepository.cs @@ -359,8 +359,8 @@ namespace Volo.Abp.Domain.Repositories.MongoDB return; } - var localEvents = generatesDomainEventsEntity.GetLocalEvents().ToArray(); - if (localEvents.Any()) + var localEvents = generatesDomainEventsEntity.GetLocalEvents()?.ToArray(); + if (localEvents != null && localEvents.Any()) { foreach (var localEvent in localEvents) { @@ -370,8 +370,8 @@ namespace Volo.Abp.Domain.Repositories.MongoDB generatesDomainEventsEntity.ClearLocalEvents(); } - var distributedEvents = generatesDomainEventsEntity.GetDistributedEvents().ToArray(); - if (distributedEvents.Any()) + var distributedEvents = generatesDomainEventsEntity.GetDistributedEvents()?.ToArray(); + if (distributedEvents != null && distributedEvents.Any()) { foreach (var distributedEvent in distributedEvents) { diff --git a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserLookupAppService.cs b/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserLookupAppService.cs index 6325daa535..48d42c4579 100644 --- a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserLookupAppService.cs +++ b/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserLookupAppService.cs @@ -16,7 +16,7 @@ namespace Volo.Abp.Identity UserLookupServiceProvider = userLookupServiceProvider; } - public virtual virtual async Task FindByIdAsync(Guid id) + public virtual async Task FindByIdAsync(Guid id) { var userData = await UserLookupServiceProvider.FindByIdAsync(id); if (userData == null) @@ -27,7 +27,7 @@ namespace Volo.Abp.Identity return new UserData(userData); } - public virtual virtual async Task FindByUserNameAsync(string userName) + public virtual async Task FindByUserNameAsync(string userName) { var userData = await UserLookupServiceProvider.FindByUserNameAsync(userName); if (userData == null) diff --git a/samples/MicroserviceDemo/applications/AuthServer.Host/AuthServerDataSeeder.cs b/samples/MicroserviceDemo/applications/AuthServer.Host/AuthServerDataSeeder.cs index b10c5d626c..03850e6d4f 100644 --- a/samples/MicroserviceDemo/applications/AuthServer.Host/AuthServerDataSeeder.cs +++ b/samples/MicroserviceDemo/applications/AuthServer.Host/AuthServerDataSeeder.cs @@ -117,6 +117,7 @@ namespace AuthServer.Host commonScopes.Union(new[] { "BackendAdminAppGateway", "IdentityService", "ProductService" }), new[] { "hybrid" }, commonSecret, + permissions: new[] { IdentityPermissions.Users.Default, "ProductManagement.Product" }, redirectUri: "http://localhost:51954/signin-oidc", postLogoutRedirectUri: "http://localhost:51954/signout-callback-oidc" ); diff --git a/samples/MicroserviceDemo/applications/BackendAdminApp.Host/BackendAdminAppHostModule.cs b/samples/MicroserviceDemo/applications/BackendAdminApp.Host/BackendAdminAppHostModule.cs index 13c4577cc0..d04fc1e656 100644 --- a/samples/MicroserviceDemo/applications/BackendAdminApp.Host/BackendAdminAppHostModule.cs +++ b/samples/MicroserviceDemo/applications/BackendAdminApp.Host/BackendAdminAppHostModule.cs @@ -54,7 +54,6 @@ namespace BackendAdminApp.Host }) .AddCookie("Cookies", options => { - options.Cookie.Expiration = TimeSpan.FromDays(365); options.ExpireTimeSpan = TimeSpan.FromDays(365); }) .AddOpenIdConnect("oidc", options => @@ -100,6 +99,7 @@ namespace BackendAdminApp.Host app.UseVirtualFiles(); app.UseRouting(); app.UseAuthentication(); + app.UseAuthorization(); app.UseAbpRequestLocalization(); app.UseSwagger(); app.UseSwaggerUI(options => diff --git a/samples/MicroserviceDemo/applications/PublicWebSite.Host/PublicWebSiteHostModule.cs b/samples/MicroserviceDemo/applications/PublicWebSite.Host/PublicWebSiteHostModule.cs index 0843eae579..66ea6d174c 100644 --- a/samples/MicroserviceDemo/applications/PublicWebSite.Host/PublicWebSiteHostModule.cs +++ b/samples/MicroserviceDemo/applications/PublicWebSite.Host/PublicWebSiteHostModule.cs @@ -52,7 +52,6 @@ namespace PublicWebSite.Host }) .AddCookie("Cookies", options => { - options.Cookie.Expiration = TimeSpan.FromDays(365); options.ExpireTimeSpan = TimeSpan.FromDays(365); }) .AddOpenIdConnect("oidc", options => diff --git a/samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/BackendAdminAppGateway.Host.csproj b/samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/BackendAdminAppGateway.Host.csproj index 35f2d6318b..3a944bec65 100644 --- a/samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/BackendAdminAppGateway.Host.csproj +++ b/samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/BackendAdminAppGateway.Host.csproj @@ -16,7 +16,7 @@ - + diff --git a/samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/BackendAdminAppGatewayHostModule.cs b/samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/BackendAdminAppGatewayHostModule.cs index 45fe70e03f..d30dc8e4fb 100644 --- a/samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/BackendAdminAppGatewayHostModule.cs +++ b/samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/BackendAdminAppGatewayHostModule.cs @@ -103,7 +103,11 @@ namespace BackendAdminAppGateway.Host app.MapWhen( ctx => ctx.Request.Path.ToString().StartsWith("/api/abp/") || ctx.Request.Path.ToString().StartsWith("/Abp/"), - app2 => { app2.UseMvcWithDefaultRouteAndArea(); } + app2 => + { + app2.UseRouting(); + app2.UseMvcWithDefaultRouteAndArea(); + } ); app.UseOcelot().Wait(); diff --git a/samples/MicroserviceDemo/gateways/InternalGateway.Host/InternalGateway.Host.csproj b/samples/MicroserviceDemo/gateways/InternalGateway.Host/InternalGateway.Host.csproj index ea060feff3..4ce9e7f630 100644 --- a/samples/MicroserviceDemo/gateways/InternalGateway.Host/InternalGateway.Host.csproj +++ b/samples/MicroserviceDemo/gateways/InternalGateway.Host/InternalGateway.Host.csproj @@ -16,7 +16,7 @@ - + diff --git a/samples/MicroserviceDemo/gateways/InternalGateway.Host/InternalGatewayHostModule.cs b/samples/MicroserviceDemo/gateways/InternalGateway.Host/InternalGatewayHostModule.cs index 1232852126..8b470f826f 100644 --- a/samples/MicroserviceDemo/gateways/InternalGateway.Host/InternalGatewayHostModule.cs +++ b/samples/MicroserviceDemo/gateways/InternalGateway.Host/InternalGatewayHostModule.cs @@ -94,7 +94,11 @@ namespace InternalGateway.Host ctx.Request.Path.ToString().StartsWith("/api/abp/") || ctx.Request.Path.ToString().StartsWith("/Abp/") || ctx.Request.Path.ToString().StartsWith("/Test/"), - app2 => { app2.UseMvcWithDefaultRouteAndArea(); } + app2 => + { + app2.UseRouting(); + app2.UseMvcWithDefaultRouteAndArea(); + } ); app.UseOcelot().Wait(); diff --git a/samples/MicroserviceDemo/gateways/PublicWebSiteGateway.Host/PublicWebSiteGateway.Host.csproj b/samples/MicroserviceDemo/gateways/PublicWebSiteGateway.Host/PublicWebSiteGateway.Host.csproj index d27c3bfbeb..313fda2630 100644 --- a/samples/MicroserviceDemo/gateways/PublicWebSiteGateway.Host/PublicWebSiteGateway.Host.csproj +++ b/samples/MicroserviceDemo/gateways/PublicWebSiteGateway.Host/PublicWebSiteGateway.Host.csproj @@ -16,7 +16,7 @@ - + diff --git a/samples/MicroserviceDemo/gateways/PublicWebSiteGateway.Host/PublicWebSiteGatewayHostModule.cs b/samples/MicroserviceDemo/gateways/PublicWebSiteGateway.Host/PublicWebSiteGatewayHostModule.cs index 2513c16c00..2add48443a 100644 --- a/samples/MicroserviceDemo/gateways/PublicWebSiteGateway.Host/PublicWebSiteGatewayHostModule.cs +++ b/samples/MicroserviceDemo/gateways/PublicWebSiteGateway.Host/PublicWebSiteGatewayHostModule.cs @@ -90,7 +90,11 @@ namespace PublicWebSiteGateway.Host app.MapWhen( ctx => ctx.Request.Path.ToString().StartsWith("/api/abp/") || ctx.Request.Path.ToString().StartsWith("/Abp/"), - app2 => { app2.UseMvcWithDefaultRouteAndArea(); } + app2 => + { + app2.UseRouting(); + app2.UseMvcWithDefaultRouteAndArea(); + } ); app.UseOcelot().Wait();