Browse Source

Merge branch 'dev' into maliming/client-proxy

pull/10040/head
maliming 5 years ago
parent
commit
c2d9bb20dd
  1. 3
      abp_io/AbpIoLocalization/AbpIoLocalization/Account/Localization/Resources/en-GB.json
  2. 3
      abp_io/AbpIoLocalization/AbpIoLocalization/Account/Localization/Resources/en.json
  3. 3
      abp_io/AbpIoLocalization/AbpIoLocalization/Account/Localization/Resources/tr.json
  4. 22
      docs/en/Background-Jobs-Hangfire.md
  5. 46
      docs/en/Community-Articles/2020-08-07-Passwordless-Authentication/POST.md
  6. 7
      framework/Volo.Abp.sln
  7. 6
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/SweetAlert2/Sweetalert2ScriptContributor.cs
  8. 8
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Bundling/SharedThemeGlobalScriptContributor.cs
  9. 24
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/sweetalert2/abp-sweetalert2.js
  10. 4
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Json/AbpJsonOptionsSetup.cs
  11. 7
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Response/AbpNoContentActionFilter.cs
  12. 6
      framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/AbpRabbitMqBackgroundJobOptions.cs
  13. 22
      framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueue.cs
  14. 35
      framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueueConfiguration.cs
  15. 42
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddModuleCommand.cs
  16. 17
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/AddModuleInfoOutput.cs
  17. 6
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/ModuleInfo.cs
  18. 10
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs
  19. 2
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Utils/ProjectNameValidator.cs
  20. 2
      framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo.Abp.EntityFrameworkCore.Oracle.csproj
  21. 8
      framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs
  22. 10
      framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/EntityHistory/EntityHistoryHelper.cs
  23. 4
      framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/ValueConverters/ExtraPropertiesValueConverter.cs
  24. 34
      framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/AbpIdentityClientOptions.cs
  25. 14
      framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelAuthenticationService.cs
  26. 4
      framework/src/Volo.Abp.Json/Volo/Abp/Json/SystemTextJson/AbpSystemTextJsonSerializerOptionsSetup.cs
  27. 8
      framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/AbpAuditingTestModule.cs
  28. 20
      framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/App/Entities/AppEntityWithSoftDelete.cs
  29. 8
      framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/App/EntityFrameworkCore/AbpAuditingTestDbContext.cs
  30. 22
      framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/Auditing_Tests.cs
  31. 5
      framework/test/Volo.Abp.Cli.Core.Tests/Volo/Abp/Cli/ProjectNameValidation_Tests.cs
  32. 24
      framework/test/Volo.Abp.IdentityModel.Tests/Volo.Abp.IdentityModel.Tests.csproj
  33. 51
      framework/test/Volo.Abp.IdentityModel.Tests/Volo/Abp/IdentityModel/AbpIdentityClientOptions_Tests.cs
  34. 12
      framework/test/Volo.Abp.IdentityModel.Tests/Volo/Abp/IdentityModel/AbpIdentityModelTestBase.cs
  35. 10
      framework/test/Volo.Abp.IdentityModel.Tests/Volo/Abp/IdentityModel/AbpIdentityModelTestModule.cs
  36. 40
      framework/test/Volo.Abp.IdentityModel.Tests/appsettings.json
  37. 4
      modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/Password/AccountProfilePasswordManagementGroupViewComponent.cs
  38. 4
      modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/PersonalInfo/AccountProfilePersonalInfoManagementGroupViewComponent.cs
  39. 13
      modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/ProfileManagementScriptBundleContributor.cs
  40. 22
      modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/AbpAuditLoggingDbContextModelBuilderExtensions.cs
  41. 18
      modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/AbpAuditLoggingModelBuilderConfigurationOptions.cs
  42. 14
      modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo/Abp/AuditLogging/MongoDB/AbpAuditLoggingMongoDbContextExtensions.cs
  43. 14
      modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo/Abp/AuditLogging/MongoDB/AuditLoggingMongoModelBuilderConfigurationOptions.cs
  44. 12
      modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo/Abp/BackgroundJobs/EntityFrameworkCore/BackgroundJobsDbContextModelCreatingExtensions.cs
  45. 18
      modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo/Abp/BackgroundJobs/EntityFrameworkCore/BackgroundJobsModelBuilderConfigurationOptions.cs
  46. 16
      modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/BackgroundJobsMongoDbContextExtensions.cs
  47. 14
      modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/BackgroundJobsMongoModelBuilderConfigurationOptions.cs
  48. 2
      modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Dockerfile
  49. 15
      modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.EntityFrameworkCore/Volo/Abp/BlobStoring/Database/EntityFrameworkCore/BlobStoringDbContextModelCreatingExtensions.cs
  50. 18
      modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.EntityFrameworkCore/Volo/Abp/BlobStoring/Database/EntityFrameworkCore/BlobStoringModelBuilderConfigurationOptions.cs
  51. 18
      modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.MongoDB/Volo/Abp/BlobStoring/Database/MongoDB/BlobStoringMongoDbContextExtensions.cs
  52. 14
      modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.MongoDB/Volo/Abp/BlobStoring/Database/MongoDB/BlobStoringMongoModelBuilderConfigurationOptions.cs
  53. 6
      modules/blogging/app/Volo.BloggingTestApp/BloggingTestAppModule.cs
  54. 11
      modules/blogging/app/Volo.BloggingTestApp/Volo.BloggingTestApp.csproj
  55. 3123
      modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/sweetalert2/sweetalert2.all.js
  56. 2
      modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/sweetalert2/sweetalert2.all.min.js
  57. 1319
      modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/sweetalert2/sweetalert2.css
  58. 3121
      modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/sweetalert2/sweetalert2.js
  59. 1
      modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/sweetalert2/sweetalert2.min.css
  60. 1
      modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/sweetalert2/sweetalert2.min.js
  61. 11
      modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Files/ImageFormatHelper.cs
  62. 25
      modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/EntityFrameworkCore/BloggingDbContextModelBuilderExtensions.cs
  63. 15
      modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/EntityFrameworkCore/BloggingModelBuilderConfigurationOptions.cs
  64. 22
      modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/MongoDB/BloggingMongoDbContextExtensions.cs
  65. 14
      modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/MongoDB/BloggingMongoModelBuilderConfigurationOptions.cs
  66. 1
      modules/cms-kit/host/Volo.CmsKit.IdentityServer/CmsKitIdentityServerModule.cs
  67. 1
      modules/cms-kit/host/Volo.CmsKit.IdentityServer/Volo.CmsKit.IdentityServer.csproj
  68. 3123
      modules/cms-kit/host/Volo.CmsKit.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.all.js
  69. 2
      modules/cms-kit/host/Volo.CmsKit.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.all.min.js
  70. 1319
      modules/cms-kit/host/Volo.CmsKit.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.css
  71. 3121
      modules/cms-kit/host/Volo.CmsKit.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.js
  72. 1
      modules/cms-kit/host/Volo.CmsKit.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.min.css
  73. 1
      modules/cms-kit/host/Volo.CmsKit.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.min.js
  74. 3123
      modules/cms-kit/host/Volo.CmsKit.Web.Host/wwwroot/libs/sweetalert2/sweetalert2.all.js
  75. 2
      modules/cms-kit/host/Volo.CmsKit.Web.Host/wwwroot/libs/sweetalert2/sweetalert2.all.min.js
  76. 1319
      modules/cms-kit/host/Volo.CmsKit.Web.Host/wwwroot/libs/sweetalert2/sweetalert2.css
  77. 3121
      modules/cms-kit/host/Volo.CmsKit.Web.Host/wwwroot/libs/sweetalert2/sweetalert2.js
  78. 1
      modules/cms-kit/host/Volo.CmsKit.Web.Host/wwwroot/libs/sweetalert2/sweetalert2.min.css
  79. 1
      modules/cms-kit/host/Volo.CmsKit.Web.Host/wwwroot/libs/sweetalert2/sweetalert2.min.js
  80. 11
      modules/cms-kit/host/Volo.CmsKit.Web.Unified/CmsKitWebUnifiedModule.cs
  81. 6
      modules/cms-kit/host/Volo.CmsKit.Web.Unified/Volo.CmsKit.Web.Unified.csproj
  82. 3123
      modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/sweetalert2/sweetalert2.all.js
  83. 2
      modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/sweetalert2/sweetalert2.all.min.js
  84. 1319
      modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/sweetalert2/sweetalert2.css
  85. 3121
      modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/sweetalert2/sweetalert2.js
  86. 1
      modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/sweetalert2/sweetalert2.min.css
  87. 1
      modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/sweetalert2/sweetalert2.min.js
  88. 35
      modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitDbContextModelCreatingExtensions.cs
  89. 18
      modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitModelBuilderConfigurationOptions.cs
  90. 12
      modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoDbContextExtensions.cs
  91. 14
      modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoModelBuilderConfigurationOptions.cs
  92. 5
      modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/_ViewStart.cshtml
  93. 5
      modules/docs/app/VoloDocs.Web/VoloDocs.Web.csproj
  94. 10
      modules/docs/app/VoloDocs.Web/VoloDocsWebModule.cs
  95. 3123
      modules/docs/app/VoloDocs.Web/wwwroot/libs/sweetalert2/sweetalert2.all.js
  96. 2
      modules/docs/app/VoloDocs.Web/wwwroot/libs/sweetalert2/sweetalert2.all.min.js
  97. 1319
      modules/docs/app/VoloDocs.Web/wwwroot/libs/sweetalert2/sweetalert2.css
  98. 3121
      modules/docs/app/VoloDocs.Web/wwwroot/libs/sweetalert2/sweetalert2.js
  99. 1
      modules/docs/app/VoloDocs.Web/wwwroot/libs/sweetalert2/sweetalert2.min.css
  100. 1
      modules/docs/app/VoloDocs.Web/wwwroot/libs/sweetalert2/sweetalert2.min.js

3
abp_io/AbpIoLocalization/AbpIoLocalization/Account/Localization/Resources/en-GB.json

@ -9,6 +9,7 @@
"OfficialBlog": "Official blog",
"CommercialHomePage": "Commercial home page",
"CommercialSupportWebSite": "Commercial support web site",
"CommunityWebSite": "ABP community web site"
"CommunityWebSite": "ABP community web site",
"ManageAccount": "My Account | ABP.IO"
}
}

3
abp_io/AbpIoLocalization/AbpIoLocalization/Account/Localization/Resources/en.json

@ -9,6 +9,7 @@
"OfficialBlog": "Official blog",
"CommercialHomePage": "Commercial home page",
"CommercialSupportWebSite": "Commercial support web site",
"CommunityWebSite": "ABP community web site"
"CommunityWebSite": "ABP community web site",
"ManageAccount": "My Account | ABP.IO"
}
}

3
abp_io/AbpIoLocalization/AbpIoLocalization/Account/Localization/Resources/tr.json

@ -9,6 +9,7 @@
"OfficialBlog": "Resmi blog",
"CommercialHomePage": "Kurumsal ana sayfa",
"CommercialSupportWebSite": "Kurumsal destek web sitesi",
"CommunityWebSite": "ABP topluluk web sitesi"
"CommunityWebSite": "ABP topluluk web sitesi",
"ManageAccount": "Hesabım | ABP.IO"
}
}

22
docs/en/Background-Jobs-Hangfire.md

@ -88,17 +88,21 @@ To make it secure by default, only local requests are allowed, however you can c
You can integrate the Hangfire dashboard to [ABP authorization system](Authorization.md) using the **AbpHangfireAuthorizationFilter**
class. This class is defined in the `Volo.Abp.Hangfire` package. The following example, checks if the current user is logged in to the application:
app.UseHangfireDashboard("/hangfire", new DashboardOptions
{
AsyncAuthorization = new[] { new AbpHangfireAuthorizationFilter() }
});
```csharp
app.UseHangfireDashboard("/hangfire", new DashboardOptions
{
AsyncAuthorization = new[] { new AbpHangfireAuthorizationFilter() }
});
```
If you want to require an additional permission, you can pass it into the constructor as below:
app.UseHangfireDashboard("/hangfire", new DashboardOptions
{
AsyncAuthorization = new[] { new AbpHangfireAuthorizationFilter("MyHangFireDashboardPermissionName") }
});
```csharp
app.UseHangfireDashboard("/hangfire", new DashboardOptions
{
AsyncAuthorization = new[] { new AbpHangfireAuthorizationFilter("MyHangFireDashboardPermissionName") }
});
```
**Important**: `UseHangfireDashboard` should be called after the authentication middleware in your `Startup` class (probably at the last line). Otherwise,
**Important**: `UseHangfireDashboard` should be called after the authentication and authorization middlewares in your `Startup` class (probably at the last line). Otherwise,
authorization will always fail!

46
docs/en/Community-Articles/2020-08-07-Passwordless-Authentication/POST.md

@ -194,16 +194,11 @@ We implemented token generation infrastructure, now it's time validate the token
```csharp
using System;
using System.Collections.Generic;
using System.Security.Claims;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.Identity;
using Volo.Abp.Security.Claims;
using Volo.Abp.Users;
using Volo.Abp.Identity.AspNetCore;
namespace PasswordlessAuthentication.Web.Controllers
{
@ -211,9 +206,12 @@ namespace PasswordlessAuthentication.Web.Controllers
{
protected IdentityUserManager UserManager { get; }
public PasswordlessController(IdentityUserManager userManager)
protected AbpSignInManager SignInManager { get; }
public PasswordlessController(IdentityUserManager userManager, AbpSignInManager signInManager)
{
UserManager = userManager;
SignInManager = signInManager;
}
public virtual async Task<IActionResult> Login(string token, string userId)
@ -228,45 +226,15 @@ namespace PasswordlessAuthentication.Web.Controllers
await UserManager.UpdateSecurityStampAsync(user);
var roles = await UserManager.GetRolesAsync(user);
var principal = new ClaimsPrincipal(
new ClaimsIdentity(CreateClaims(user, roles), IdentityConstants.ApplicationScheme)
);
await HttpContext.SignInAsync(IdentityConstants.ApplicationScheme, principal);
await SignInManager.SignInAsync(user, isPersistent: false);
return Redirect("/");
}
private static IEnumerable<Claim> CreateClaims(IUser user, IEnumerable<string> roles)
{
var claims = new List<Claim>
{
new Claim("sub", user.Id.ToString()),
new Claim(AbpClaimTypes.UserId, user.Id.ToString()),
new Claim(AbpClaimTypes.Email, user.Email),
new Claim(AbpClaimTypes.UserName, user.UserName),
new Claim(AbpClaimTypes.EmailVerified, user.EmailConfirmed.ToString().ToLower()),
};
if (!string.IsNullOrWhiteSpace(user.PhoneNumber))
{
claims.Add(new Claim(AbpClaimTypes.PhoneNumber, user.PhoneNumber));
}
foreach (var role in roles)
{
claims.Add(new Claim(AbpClaimTypes.Role, role));
}
return claims;
}
}
}
```
We created an endpoint for `/Passwordless/Login` that gets the token and the user Id. In this action, we find the user via repository and validate the token via `UserManager.VerifyUserTokenAsync()` method. If it's valid, we create claims of the user then call `HttpContext.SignInAsync` to be able to create an encrypted cookie and add it to the current response. Finally we redirect the page to the root URL.
We created an endpoint for `/Passwordless/Login` that gets the token and the user Id. In this action, we find the user via repository and validate the token via `UserManager.VerifyUserTokenAsync()` method. If it's valid, we call `SignInManager.SignInAsync` to be able to create an encrypted cookie and add it to the current response. Finally we redirect the page to the root URL.
That's all! We created a passwordless login with 7 steps.

7
framework/Volo.Abp.sln

@ -383,6 +383,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.TextTemplating.Scr
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.MongoDB.Tests.SecondContext", "test\Volo.Abp.MongoDB.Tests.SecondContext\Volo.Abp.MongoDB.Tests.SecondContext.csproj", "{90B1866A-EF99-40B9-970E-B898E5AA523F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.IdentityModel.Tests", "test\Volo.Abp.IdentityModel.Tests\Volo.Abp.IdentityModel.Tests.csproj", "{40C6740E-BFCA-4D37-8344-3D84E2044BB2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Threading.Tests", "test\Volo.Abp.Threading.Tests\Volo.Abp.Threading.Tests.csproj", "{7B2FCAD6-86E6-49C8-ADBE-A61B4F4B101B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Auditing.Contracts", "src\Volo.Abp.Auditing.Contracts\Volo.Abp.Auditing.Contracts.csproj", "{508B6355-AD28-4E60-8549-266D21DBF2CF}"
@ -1145,6 +1147,10 @@ Global
{90B1866A-EF99-40B9-970E-B898E5AA523F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{90B1866A-EF99-40B9-970E-B898E5AA523F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{90B1866A-EF99-40B9-970E-B898E5AA523F}.Release|Any CPU.Build.0 = Release|Any CPU
{40C6740E-BFCA-4D37-8344-3D84E2044BB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{40C6740E-BFCA-4D37-8344-3D84E2044BB2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{40C6740E-BFCA-4D37-8344-3D84E2044BB2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{40C6740E-BFCA-4D37-8344-3D84E2044BB2}.Release|Any CPU.Build.0 = Release|Any CPU
{7B2FCAD6-86E6-49C8-ADBE-A61B4F4B101B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7B2FCAD6-86E6-49C8-ADBE-A61B4F4B101B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7B2FCAD6-86E6-49C8-ADBE-A61B4F4B101B}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -1346,6 +1352,7 @@ Global
{C996F458-98FB-483D-9306-4701290E2FC1} = {447C8A77-E5F0-4538-8687-7383196D04EA}
{75D8DADB-3FA9-4C1D-B23A-DBFD08133B7C} = {447C8A77-E5F0-4538-8687-7383196D04EA}
{90B1866A-EF99-40B9-970E-B898E5AA523F} = {447C8A77-E5F0-4538-8687-7383196D04EA}
{40C6740E-BFCA-4D37-8344-3D84E2044BB2} = {447C8A77-E5F0-4538-8687-7383196D04EA}
{7B2FCAD6-86E6-49C8-ADBE-A61B4F4B101B} = {447C8A77-E5F0-4538-8687-7383196D04EA}
{508B6355-AD28-4E60-8549-266D21DBF2CF} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6}
EndGlobalSection

6
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/SweetAlert/SweetalertScriptContributor.cs → framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/SweetAlert2/Sweetalert2ScriptContributor.cs

@ -3,14 +3,14 @@ using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.Core;
using Volo.Abp.Modularity;
namespace Volo.Abp.AspNetCore.Mvc.UI.Packages.SweetAlert
namespace Volo.Abp.AspNetCore.Mvc.UI.Packages.SweetAlert2
{
[DependsOn(typeof(CoreScriptContributor))]
public class SweetalertScriptContributor : BundleContributor
public class Sweetalert2ScriptContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
context.Files.AddIfNotContains("/libs/sweetalert/sweetalert.min.js");
context.Files.AddIfNotContains("/libs/sweetalert2/sweetalert2.all.min.js");
}
}
}

8
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Bundling/SharedThemeGlobalScriptContributor.cs

@ -9,7 +9,7 @@ using Volo.Abp.AspNetCore.Mvc.UI.Packages.Lodash;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.Luxon;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.MalihuCustomScrollbar;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.Select2;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.SweetAlert;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.SweetAlert2;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.Timeago;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.Toastr;
using Volo.Abp.Modularity;
@ -24,7 +24,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Bundling
typeof(JQueryFormScriptContributor),
typeof(Select2ScriptContributor),
typeof(DatatablesNetBs4ScriptContributor),
typeof(SweetalertScriptContributor),
typeof(Sweetalert2ScriptContributor),
typeof(ToastrScriptBundleContributor),
typeof(MalihuCustomScrollbarPluginScriptBundleContributor),
typeof(LuxonScriptContributor),
@ -44,9 +44,9 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Bundling
"/libs/abp/aspnetcore-mvc-ui-theme-shared/bootstrap/dom-event-handlers.js",
"/libs/abp/aspnetcore-mvc-ui-theme-shared/bootstrap/modal-manager.js",
"/libs/abp/aspnetcore-mvc-ui-theme-shared/datatables/datatables-extensions.js",
"/libs/abp/aspnetcore-mvc-ui-theme-shared/sweetalert/abp-sweetalert.js",
"/libs/abp/aspnetcore-mvc-ui-theme-shared/sweetalert2/abp-sweetalert2.js",
"/libs/abp/aspnetcore-mvc-ui-theme-shared/toastr/abp-toastr.js"
});
}
}
}
}

24
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/sweetalert/abp-sweetalert.js → framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/sweetalert2/abp-sweetalert2.js

@ -1,6 +1,6 @@
var abp = abp || {};
(function ($) {
if (!sweetAlert || !$) {
if (!Swal || !$) {
return;
}
@ -27,7 +27,8 @@
confirm: {
icon: 'warning',
title: 'Are you sure?',
buttons: ['Cancel', 'Yes']
showCancelButton: true,
reverseButtons: true
}
}
};
@ -51,7 +52,7 @@
);
return $.Deferred(function ($dfd) {
sweetAlert(opts).then(function () {
Swal.fire(opts).then(function () {
$dfd.resolve();
});
});
@ -73,7 +74,7 @@
return showMessage('error', message, title);
};
abp.message.confirm = function (message, titleOrCallback, callback, closeOnEsc) {
abp.message.confirm = function (message, titleOrCallback, callback) {
var userOpts = {
text: message
@ -86,8 +87,6 @@
userOpts.title = titleOrCallback;
};
userOpts.closeOnEsc = closeOnEsc;
var opts = $.extend(
{},
abp.libs.sweetAlert.config['default'],
@ -96,10 +95,10 @@
);
return $.Deferred(function ($dfd) {
sweetAlert(opts).then(function (isConfirmed) {
callback && callback(isConfirmed);
$dfd.resolve(isConfirmed);
});
Swal.fire(opts).then(result => {
callback && callback(result.value);
$dfd.resolve(result.value);
})
});
};
@ -107,7 +106,8 @@
var l = abp.localization.getResource('AbpUi');
abp.libs.sweetAlert.config.confirm.title = l('AreYouSure');
abp.libs.sweetAlert.config.confirm.buttons = [l('Cancel'), l('Yes')];
abp.libs.sweetAlert.config.confirm.showCancelButton = true;
abp.libs.sweetAlert.config.confirm.reverseButtons = true;
});
})(jQuery);
})(jQuery);

4
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Json/AbpJsonOptionsSetup.cs

@ -30,10 +30,6 @@ namespace Volo.Abp.AspNetCore.Mvc.Json
options.JsonSerializerOptions.Converters.Add(new ObjectToInferredTypesConverter());
options.JsonSerializerOptions.Converters.Add(new AbpHasExtraPropertiesJsonConverterFactory());
// Remove after this PR.
// https://github.com/dotnet/runtime/pull/57525
options.JsonSerializerOptions.NumberHandling = JsonNumberHandling.AllowReadingFromString;
}
}
}

7
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Response/AbpNoContentActionFilter.cs

@ -18,8 +18,9 @@ namespace Volo.Abp.AspNetCore.Mvc.Response
await next();
if (context.HttpContext.Response.StatusCode == (int)HttpStatusCode.OK
&& context.Result == null)
if (!context.HttpContext.Response.HasStarted &&
context.HttpContext.Response.StatusCode == (int)HttpStatusCode.OK &&
context.Result == null)
{
var returnType = context.ActionDescriptor.GetReturnType();
if (returnType == typeof(Task) || returnType == typeof(void))
@ -29,4 +30,4 @@ namespace Volo.Abp.AspNetCore.Mvc.Response
}
}
}
}
}

6
framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/AbpRabbitMqBackgroundJobOptions.cs

@ -15,10 +15,16 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ
/// </summary>
public string DefaultQueueNamePrefix { get; set; }
/// <summary>
/// Default value: "AbpBackgroundJobsDelayed."
/// </summary>
public string DefaultDelayedQueueNamePrefix { get; set;}
public AbpRabbitMqBackgroundJobOptions()
{
JobQueues = new Dictionary<Type, JobQueueConfiguration>();
DefaultQueueNamePrefix = "AbpBackgroundJobs.";
DefaultDelayedQueueNamePrefix = "AbpBackgroundJobsDelayed.";
}
}
}

22
framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueue.cs

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
@ -64,7 +65,8 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ
return AbpRabbitMqBackgroundJobOptions.JobQueues.GetOrDefault(typeof(TArgs)) ??
new JobQueueConfiguration(
typeof(TArgs),
AbpRabbitMqBackgroundJobOptions.DefaultQueueNamePrefix + JobConfiguration.JobName
AbpRabbitMqBackgroundJobOptions.DefaultQueueNamePrefix + JobConfiguration.JobName,
AbpRabbitMqBackgroundJobOptions.DefaultDelayedQueueNamePrefix + JobConfiguration.JobName
);
}
@ -133,6 +135,9 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ
var result = QueueConfiguration.Declare(ChannelAccessor.Channel);
Logger.LogDebug($"RabbitMQ Queue '{QueueConfiguration.QueueName}' has {result.MessageCount} messages and {result.ConsumerCount} consumers.");
// Declare delayed queue
QueueConfiguration.DeclareDelayed(ChannelAccessor.Channel);
if (AbpBackgroundJobOptions.IsJobExecutionEnabled)
{
Consumer = new AsyncEventingBasicConsumer(ChannelAccessor.Channel);
@ -154,12 +159,21 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ
BackgroundJobPriority priority = BackgroundJobPriority.Normal,
TimeSpan? delay = null)
{
//TODO: How to handle priority & delay?
//TODO: How to handle priority
var routingKey = QueueConfiguration.QueueName;
var basicProperties = CreateBasicPropertiesToPublish();
if (delay.HasValue)
{
routingKey = QueueConfiguration.DelayedQueueName;
basicProperties.Expiration = delay.Value.TotalMilliseconds.ToString();
}
ChannelAccessor.Channel.BasicPublish(
exchange: "",
routingKey: QueueConfiguration.QueueName,
basicProperties: CreateBasicPropertiesToPublish(),
routingKey: routingKey,
basicProperties: basicProperties,
body: Serializer.Serialize(args)
);

35
framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueueConfiguration.cs

@ -1,4 +1,6 @@
using System;
using System.Collections.Generic;
using RabbitMQ.Client;
using Volo.Abp.RabbitMQ;
namespace Volo.Abp.BackgroundJobs.RabbitMQ
@ -9,21 +11,42 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ
public string ConnectionName { get; set; }
public string DelayedQueueName { get; set; }
public JobQueueConfiguration(
Type jobArgsType,
string queueName,
Type jobArgsType,
string queueName,
string delayedQueueName,
string connectionName = null,
bool durable = true,
bool exclusive = false,
bool autoDelete = false)
: base(
queueName,
durable,
exclusive,
queueName,
durable,
exclusive,
autoDelete)
{
JobArgsType = jobArgsType;
ConnectionName = connectionName;
DelayedQueueName = delayedQueueName;
}
public virtual QueueDeclareOk DeclareDelayed(IModel channel)
{
var delayedArguments = new Dictionary<string, object>(Arguments)
{
["x-dead-letter-routing-key"] = QueueName,
["x-dead-letter-exchange"] = string.Empty
};
return channel.QueueDeclare(
queue: DelayedQueueName,
durable: Durable,
exclusive: Exclusive,
autoDelete: AutoDelete,
arguments: delayedArguments
);
}
}
}
}

42
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddModuleCommand.cs

@ -14,11 +14,25 @@ namespace Volo.Abp.Cli.Commands
{
public class AddModuleCommand : IConsoleCommand, ITransientDependency
{
private AddModuleInfoOutput _lastAddedModuleInfo;
public ILogger<AddModuleCommand> Logger { get; set; }
protected SolutionModuleAdder SolutionModuleAdder { get; }
public SolutionAbpVersionFinder SolutionAbpVersionFinder { get; }
public AddModuleInfoOutput LastAddedModuleInfo
{
get
{
if (_lastAddedModuleInfo == null)
{
throw new Exception("You need to add a module first to get the last added module info!");
}
return _lastAddedModuleInfo;
}
}
public AddModuleCommand(SolutionModuleAdder solutionModuleAdder, SolutionAbpVersionFinder solutionAbpVersionFinder)
{
SolutionModuleAdder = solutionModuleAdder;
@ -51,16 +65,24 @@ namespace Volo.Abp.Cli.Commands
version = SolutionAbpVersionFinder.Find(solutionFile);
}
await SolutionModuleAdder.AddAsync(
solutionFile,
commandLineArgs.Target,
version,
skipDbMigrations,
withSourceCode,
addSourceCodeToSolutionFile,
newTemplate,
newProTemplate
);
var moduleInfo = await SolutionModuleAdder.AddAsync(
solutionFile,
commandLineArgs.Target,
version,
skipDbMigrations,
withSourceCode,
addSourceCodeToSolutionFile,
newTemplate,
newProTemplate
);
_lastAddedModuleInfo = new AddModuleInfoOutput
{
DisplayName = moduleInfo.DisplayName,
Name = moduleInfo.Name,
DocumentationLinks = moduleInfo.DocumentationLinks,
InstallationCompleteMessage = moduleInfo.InstallationCompleteMessage
};
}
public string GetUsageInfo()

17
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/AddModuleInfoOutput.cs

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
namespace Volo.Abp.Cli.ProjectModification
{
public class AddModuleInfoOutput
{
public string Name { get; set; }
public string DisplayName { get; set; }
public string DocumentationLinks { get; set; }
public string InstallationCompleteMessage { get; set; }
}
}

6
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/ModuleInfo.cs

@ -18,6 +18,8 @@ namespace Volo.Abp.Cli.ProjectModification
public List<NpmPackageInfo> NpmPackages { get; set; }
public string InstallationCompleteMessage { get; set; }
public string GetFirstDocumentationLinkOrNull()
{
if (string.IsNullOrWhiteSpace(DocumentationLinks))
@ -26,8 +28,8 @@ namespace Volo.Abp.Cli.ProjectModification
}
var docs = DocumentationLinks.Split(" ", StringSplitOptions.RemoveEmptyEntries);
return docs.Any() ?
docs.First() :
return docs.Any() ?
docs.First() :
null;
}
}

10
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs

@ -78,8 +78,7 @@ namespace Volo.Abp.Cli.ProjectModification
Logger = NullLogger<SolutionModuleAdder>.Instance;
}
public virtual async Task AddAsync(
[NotNull] string solutionFile,
public virtual async Task<ModuleWithMastersInfo> AddAsync([NotNull] string solutionFile,
[NotNull] string moduleName,
string version,
bool skipDbMigrations = false,
@ -94,8 +93,7 @@ namespace Volo.Abp.Cli.ProjectModification
var module = await GetModuleInfoAsync(moduleName, newTemplate, newProTemplate);
module = RemoveIncompatiblePackages(module, version);
Logger.LogInformation(
$"Installing module '{module.Name}' to the solution '{Path.GetFileNameWithoutExtension(solutionFile)}'");
Logger.LogInformation($"Installing module '{module.Name}' to the solution '{Path.GetFileNameWithoutExtension(solutionFile)}'");
var projectFiles = ProjectFinder.GetProjectFiles(solutionFile);
@ -137,6 +135,8 @@ namespace Volo.Abp.Cli.ProjectModification
{
CmdHelper.OpenWebPage(documentationLink);
}
return module;
}
private ModuleWithMastersInfo RemoveIncompatiblePackages(ModuleWithMastersInfo module, string version)
@ -146,7 +146,7 @@ namespace Volo.Abp.Cli.ProjectModification
return module;
}
private bool IsPackageInCompatible(string minVersion, string maxVersion, string version)
private static bool IsPackageInCompatible(string minVersion, string maxVersion, string version)
{
try
{

2
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Utils/ProjectNameValidator.cs

@ -53,7 +53,7 @@ namespace Volo.Abp.Cli.Utils
{
foreach (var illegalKeyword in IllegalKeywords)
{
if (projectName.Contains(illegalKeyword))
if (projectName.Split(".").Contains(illegalKeyword))
{
throw new CliUsageException("Project name cannot contain the word \"" + illegalKeyword + "\". Specify a different name.");
}

2
framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo.Abp.EntityFrameworkCore.Oracle.csproj

@ -18,7 +18,7 @@
<ProjectReference Include="..\Volo.Abp.EntityFrameworkCore\Volo.Abp.EntityFrameworkCore.csproj" />
</ItemGroup>
<ItemGroup>
<ItemGroup>
<PackageReference Include="Oracle.EntityFrameworkCore" Version="5.21.1" />
</ItemGroup>

8
framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs

@ -155,6 +155,10 @@ namespace Volo.Abp.EntityFrameworkCore
{
try
{
ApplyAbpConcepts();
var eventReport = CreateEventReport();
var auditLog = AuditingManager?.Current?.Log;
List<EntityChangeInfo> entityChangeList = null;
if (auditLog != null)
@ -162,10 +166,6 @@ namespace Volo.Abp.EntityFrameworkCore
entityChangeList = EntityHistoryHelper.CreateChangeList(ChangeTracker.Entries().ToList());
}
ApplyAbpConcepts();
var eventReport = CreateEventReport();
var result = await base.SaveChangesAsync(acceptAllChangesOnSuccess, cancellationToken);
PublishEntityEvents(eventReport);

10
framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/EntityHistory/EntityHistoryHelper.cs

@ -166,7 +166,7 @@ namespace Volo.Abp.EntityFrameworkCore.EntityHistory
foreach (var property in properties)
{
var propertyEntry = entityEntry.Property(property.Name);
if (ShouldSavePropertyHistory(propertyEntry, isCreated || isDeleted))
if (ShouldSavePropertyHistory(propertyEntry, isCreated || isDeleted) && !IsSoftDeleted(entityEntry))
{
propertyChanges.Add(new EntityPropertyChangeInfo
{
@ -188,11 +188,11 @@ namespace Volo.Abp.EntityFrameworkCore.EntityHistory
protected virtual bool IsDeleted(EntityEntry entityEntry)
{
if (entityEntry.State == EntityState.Deleted)
{
return true;
}
return entityEntry.State == EntityState.Deleted || IsSoftDeleted(entityEntry);
}
protected virtual bool IsSoftDeleted(EntityEntry entityEntry)
{
var entity = entityEntry.Entity;
return entity is ISoftDelete && entity.As<ISoftDelete>().IsDeleted;
}

4
framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/ValueConverters/ExtraPropertiesValueConverter.cs

@ -51,10 +51,6 @@ namespace Volo.Abp.EntityFrameworkCore.ValueConverters
var deserializeOptions = new JsonSerializerOptions();
deserializeOptions.Converters.Add(new ObjectToInferredTypesConverter());
// Remove after this PR.
// https://github.com/dotnet/runtime/pull/57525
deserializeOptions.NumberHandling = JsonNumberHandling.AllowReadingFromString;
var dictionary = JsonSerializer.Deserialize<ExtraPropertyDictionary>(extraPropertiesAsJson, deserializeOptions) ??
new ExtraPropertyDictionary();

34
framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/AbpIdentityClientOptions.cs

@ -1,4 +1,9 @@
namespace Volo.Abp.IdentityModel
using System;
using System.Collections.Generic;
using System.Linq;
using Volo.Abp.MultiTenancy;
namespace Volo.Abp.IdentityModel
{
public class AbpIdentityClientOptions
{
@ -8,5 +13,30 @@
{
IdentityClients = new IdentityClientConfigurationDictionary();
}
public IdentityClientConfiguration GetClientConfiguration(ICurrentTenant currentTenant, string identityClientName = null)
{
if (identityClientName.IsNullOrWhiteSpace())
{
identityClientName = IdentityClientConfigurationDictionary.DefaultName;
}
if (currentTenant.Id.HasValue)
{
var tenantConfiguration = IdentityClients.FirstOrDefault(x => x.Key == $"{identityClientName}.{currentTenant.Id}");
if (tenantConfiguration.Key == null && !currentTenant.Name.IsNullOrWhiteSpace())
{
tenantConfiguration = IdentityClients.FirstOrDefault(x => x.Key == $"{identityClientName}.{currentTenant.Name}");
}
if (tenantConfiguration.Key != null)
{
return tenantConfiguration.Value;
}
}
return IdentityClients.GetOrDefault(identityClientName) ??
IdentityClients.Default;
}
}
}
}

14
framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelAuthenticationService.cs

@ -66,7 +66,7 @@ namespace Volo.Abp.IdentityModel
protected virtual async Task<string> GetAccessTokenOrNullAsync(string identityClientName)
{
var configuration = GetClientConfiguration(identityClientName);
var configuration = ClientOptions.GetClientConfiguration(CurrentTenant, identityClientName);
if (configuration == null)
{
Logger.LogWarning($"Could not find {nameof(IdentityClientConfiguration)} for {identityClientName}. Either define a configuration for {identityClientName} or set a default configuration.");
@ -114,17 +114,6 @@ namespace Volo.Abp.IdentityModel
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", accessToken);
}
private IdentityClientConfiguration GetClientConfiguration(string identityClientName = null)
{
if (identityClientName.IsNullOrEmpty())
{
return ClientOptions.IdentityClients.Default;
}
return ClientOptions.IdentityClients.GetOrDefault(identityClientName) ??
ClientOptions.IdentityClients.Default;
}
protected virtual async Task<string> GetTokenEndpoint(IdentityClientConfiguration configuration)
{
//TODO: Can use (configuration.Authority + /connect/token) directly?
@ -205,6 +194,7 @@ namespace Volo.Abp.IdentityModel
UserName = configuration.UserName,
Password = configuration.UserPassword
};
IdentityModelHttpRequestMessageOptions.ConfigureHttpRequestMessage?.Invoke(request);
AddParametersToRequestAsync(configuration, request);

4
framework/src/Volo.Abp.Json/Volo/Abp/Json/SystemTextJson/AbpSystemTextJsonSerializerOptionsSetup.cs

@ -29,10 +29,6 @@ namespace Volo.Abp.Json.SystemTextJson
// If the user hasn't explicitly configured the encoder, use the less strict encoder that does not encode all non-ASCII characters.
options.JsonSerializerOptions.Encoder ??= JavaScriptEncoder.UnsafeRelaxedJsonEscaping;
// Remove after this PR.
// https://github.com/dotnet/runtime/pull/57525
options.JsonSerializerOptions.NumberHandling = JsonNumberHandling.AllowReadingFromString;
}
}
}

8
framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/AbpAuditingTestModule.cs

@ -43,6 +43,12 @@ namespace Volo.Abp.Auditing
"AppEntityWithSelector",
type => type == typeof(AppEntityWithSelector))
);
options.EntityHistorySelectors.Add(
new NamedTypeSelector(
"AppEntityWithSoftDelete",
type => type == typeof(AppEntityWithSoftDelete))
);
});
context.Services.AddType<Auditing_Tests.MyAuditedObject1>();
@ -62,4 +68,4 @@ namespace Volo.Abp.Auditing
return connection;
}
}
}
}

20
framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/App/Entities/AppEntityWithSoftDelete.cs

@ -0,0 +1,20 @@
using System;
using Volo.Abp.Domain.Entities;
namespace Volo.Abp.Auditing.App.Entities
{
public class AppEntityWithSoftDelete : AggregateRoot<Guid>, IHasDeletionTime
{
public AppEntityWithSoftDelete(Guid id, string name)
: base(id)
{
Name = name;
}
public string Name { get; set; }
public bool IsDeleted { get; set; }
public DateTime? DeletionTime { get; set; }
}
}

8
framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/App/EntityFrameworkCore/AbpAuditingTestDbContext.cs

@ -17,15 +17,17 @@ namespace Volo.Abp.Auditing.App.EntityFrameworkCore
public DbSet<AppEntityWithPropertyHasAudited> AppEntityWithPropertyHasAudited { get; set; }
public DbSet<AppEntityWithSelector> AppEntityWithSelector { get; set; }
public DbSet<AppFullAuditedEntityWithAudited> AppFullAuditedEntityWithAudited { get; set; }
public DbSet<AppEntityWithAuditedAndHasCustomAuditingProperties> AppEntityWithAuditedAndHasCustomAuditingProperties { get; set; }
public DbSet<AppEntityWithSoftDelete> AppEntityWithSoftDelete { get; set; }
public AbpAuditingTestDbContext(DbContextOptions<AbpAuditingTestDbContext> options)
: base(options)
{
}
}
}
}

22
framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/Auditing_Tests.cs

@ -314,5 +314,27 @@ namespace Volo.Abp.Auditing
&& x.EntityChanges[0].PropertyChanges[0].PropertyName == nameof(AppEntityWithAudited.Name)));
#pragma warning restore 4014
}
[Fact]
public virtual async Task Should_Write_AuditLog_For_Soft_Deleted_Entity()
{
var entity = new AppEntityWithSoftDelete(Guid.NewGuid(), "test name");
var repository = ServiceProvider.GetRequiredService<IBasicRepository<AppEntityWithSoftDelete, Guid>>();
await repository.InsertAsync(entity);
using (var scope = _auditingManager.BeginScope())
{
await repository.DeleteAsync(entity.Id);
await scope.SaveAsync();
}
#pragma warning disable 4014
_auditingStore.Received().SaveAsync(Arg.Is<AuditLogInfo>(x => x.EntityChanges.Count == 1 &&
x.EntityChanges[0].ChangeType == EntityChangeType.Deleted &&
x.EntityChanges[0].PropertyChanges.Count == 0));
#pragma warning restore 4014
}
}
}

5
framework/test/Volo.Abp.Cli.Core.Tests/Volo/Abp/Cli/ProjectNameValidation_Tests.cs

@ -51,13 +51,16 @@ namespace Volo.Abp.Cli
{
var illegalKeywords = new[]
{
"Blazor"
"Blazor"
};
foreach (var illegalKeyword in illegalKeywords)
{
var args = new CommandLineArgs("new", illegalKeyword);
await _newCommand.ExecuteAsync(args).ShouldThrowAsync<CliUsageException>();
args = new CommandLineArgs("new", "Acme." + illegalKeyword);
await _newCommand.ExecuteAsync(args).ShouldThrowAsync<CliUsageException>();
}
}

24
framework/test/Volo.Abp.IdentityModel.Tests/Volo.Abp.IdentityModel.Tests.csproj

@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\common.test.props" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
<ProjectReference Include="..\..\src\Volo.Abp.IdentityModel\Volo.Abp.IdentityModel.csproj" />
<ProjectReference Include="..\AbpTestBase\AbpTestBase.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(MicrosoftNETTestSdkPackageVersion)" />
</ItemGroup>
<ItemGroup>
<None Remove="appsettings.json" />
<Content Include="appsettings.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Project>

51
framework/test/Volo.Abp.IdentityModel.Tests/Volo/Abp/IdentityModel/AbpIdentityClientOptions_Tests.cs

@ -0,0 +1,51 @@
using System;
using Microsoft.Extensions.Options;
using Shouldly;
using Volo.Abp.MultiTenancy;
using Xunit;
namespace Volo.Abp.IdentityModel
{
public class AbpIdentityClientOptions_Tests : AbpIdentityModelTestBase
{
private readonly ICurrentTenant _currentTenant;
private readonly AbpIdentityClientOptions _identityClientOptions;
public AbpIdentityClientOptions_Tests()
{
_currentTenant = GetRequiredService<ICurrentTenant>();
_identityClientOptions = GetRequiredService<IOptions<AbpIdentityClientOptions>>().Value;
}
[Fact]
public void GetClientConfiguration_Test()
{
var hostDefaultConfiguration = _identityClientOptions.GetClientConfiguration(_currentTenant);
hostDefaultConfiguration.UserName.ShouldBe("host_default_admin");
var hostIdentityConfiguration = _identityClientOptions.GetClientConfiguration(_currentTenant, "Identity");
hostIdentityConfiguration.UserName.ShouldBe("host_identity_admin");
using (_currentTenant.Change(Guid.Parse("f72a344f-651e-49f0-85f6-be260a10e4df"), "Test_Tenant1"))
{
var tenantDefaultConfiguration = _identityClientOptions.GetClientConfiguration(_currentTenant);
tenantDefaultConfiguration.UserName.ShouldBe("tenant_default_admin");
}
using (_currentTenant.Change(Guid.Parse("f72a344f-651e-49f0-85f6-be260a10e4df")))
{
var tenantIdentityConfiguration = _identityClientOptions.GetClientConfiguration(_currentTenant, "Identity");
tenantIdentityConfiguration.UserName.ShouldBe("tenant_identity_admin");
}
using (_currentTenant.Change(Guid.NewGuid()))
{
var configuration = _identityClientOptions.GetClientConfiguration(_currentTenant);
configuration.UserName.ShouldBe("host_default_admin");
configuration = _identityClientOptions.GetClientConfiguration(_currentTenant, "Identity");
configuration.UserName.ShouldBe("host_identity_admin");
}
}
}
}

12
framework/test/Volo.Abp.IdentityModel.Tests/Volo/Abp/IdentityModel/AbpIdentityModelTestBase.cs

@ -0,0 +1,12 @@
using Volo.Abp.Testing;
namespace Volo.Abp.IdentityModel
{
public abstract class AbpIdentityModelTestBase : AbpIntegratedTest<AbpIdentityModelTestModule>
{
protected override void SetAbpApplicationCreationOptions(AbpApplicationCreationOptions options)
{
options.UseAutofac();
}
}
}

10
framework/test/Volo.Abp.IdentityModel.Tests/Volo/Abp/IdentityModel/AbpIdentityModelTestModule.cs

@ -0,0 +1,10 @@
using Volo.Abp.Modularity;
namespace Volo.Abp.IdentityModel
{
[DependsOn(typeof(AbpIdentityModelModule))]
public class AbpIdentityModelTestModule : AbpModule
{
}
}

40
framework/test/Volo.Abp.IdentityModel.Tests/appsettings.json

@ -0,0 +1,40 @@
{
"IdentityClients": {
"Default": {
"GrantType": "password",
"ClientId": "Test_App",
"ClientSecret": "1q2w3e*",
"UserName": "host_default_admin",
"UserPassword": "1q2w3E*",
"Authority": "https://localhost:44395",
"Scope": "Test_Scope"
},
"Default.Test_Tenant1": {
"GrantType": "password",
"ClientId": "Test_App",
"ClientSecret": "1q2w3e*",
"UserName": "tenant_default_admin",
"UserPassword": "1q2w3E*",
"Authority": "https://localhost:44395",
"Scope": "Test_Scope"
},
"Identity": {
"GrantType": "password",
"ClientId": "Test_App",
"ClientSecret": "1q2w3e*",
"UserName": "host_identity_admin",
"UserPassword": "1q2w3E*",
"Authority": "https://localhost:44395",
"Scope": "Test_Scope"
},
"Identity.f72a344f-651e-49f0-85f6-be260a10e4df": {
"GrantType": "password",
"ClientId": "Test_App",
"ClientSecret": "1q2w3e*",
"UserName": "tenant_identity_admin",
"UserPassword": "1q2w3E*",
"Authority": "https://localhost:44395",
"Scope": "Test_Scope"
}
}
}

4
modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/Password/AccountProfilePasswordManagementGroupViewComponent.cs

@ -2,12 +2,16 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.UI.Widgets;
using Volo.Abp.Auditing;
using Volo.Abp.Identity;
using Volo.Abp.Validation;
namespace Volo.Abp.Account.Web.Pages.Account.Components.ProfileManagementGroup.Password
{
[Widget(
ScriptTypes = new[] { typeof(ProfileManagementScriptBundleContributor) }
)]
public class AccountProfilePasswordManagementGroupViewComponent : AbpViewComponent
{
private readonly IProfileAppService _profileAppService;

4
modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/PersonalInfo/AccountProfilePersonalInfoManagementGroupViewComponent.cs

@ -2,12 +2,16 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.UI.Widgets;
using Volo.Abp.Domain.Entities;
using Volo.Abp.Identity;
using Volo.Abp.Validation;
namespace Volo.Abp.Account.Web.Pages.Account.Components.ProfileManagementGroup.PersonalInfo
{
[Widget(
ScriptTypes = new[] { typeof(ProfileManagementScriptBundleContributor) }
)]
public class AccountProfilePersonalInfoManagementGroupViewComponent : AbpViewComponent
{
private readonly IProfileAppService _profileAppService;

13
modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/ProfileManagementScriptBundleContributor.cs

@ -0,0 +1,13 @@
using System.Collections.Generic;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
namespace Volo.Abp.Account.Web.Pages.Account.Components.ProfileManagementGroup
{
public class ProfileManagementScriptBundleContributor: BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
context.Files.AddIfNotContains("/client-proxies/identity-proxy.js");
}
}
}

22
modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/AbpAuditLoggingDbContextModelBuilderExtensions.cs

@ -1,29 +1,19 @@
using System;
using JetBrains.Annotations;
using JetBrains.Annotations;
using Microsoft.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.Modeling;
using Volo.Abp.Identity.EntityFrameworkCore;
namespace Volo.Abp.AuditLogging.EntityFrameworkCore
{
public static class AbpAuditLoggingDbContextModelBuilderExtensions
{
public static void ConfigureAuditLogging(
[NotNull] this ModelBuilder builder,
Action<AbpAuditLoggingModelBuilderConfigurationOptions> optionsAction = null)
[NotNull] this ModelBuilder builder)
{
Check.NotNull(builder, nameof(builder));
var options = new AbpAuditLoggingModelBuilderConfigurationOptions(
AbpAuditLoggingDbProperties.DbTablePrefix,
AbpAuditLoggingDbProperties.DbSchema
);
optionsAction?.Invoke(options);
builder.Entity<AuditLog>(b =>
{
b.ToTable(options.TablePrefix + "AuditLogs", options.Schema);
b.ToTable(AbpAuditLoggingDbProperties.DbTablePrefix + "AuditLogs", AbpAuditLoggingDbProperties.DbSchema);
b.ConfigureByConvention();
@ -56,7 +46,7 @@ namespace Volo.Abp.AuditLogging.EntityFrameworkCore
builder.Entity<AuditLogAction>(b =>
{
b.ToTable(options.TablePrefix + "AuditLogActions", options.Schema);
b.ToTable(AbpAuditLoggingDbProperties.DbTablePrefix + "AuditLogActions", AbpAuditLoggingDbProperties.DbSchema);
b.ConfigureByConvention();
@ -75,7 +65,7 @@ namespace Volo.Abp.AuditLogging.EntityFrameworkCore
builder.Entity<EntityChange>(b =>
{
b.ToTable(options.TablePrefix + "EntityChanges", options.Schema);
b.ToTable(AbpAuditLoggingDbProperties.DbTablePrefix + "EntityChanges", AbpAuditLoggingDbProperties.DbSchema);
b.ConfigureByConvention();
@ -96,7 +86,7 @@ namespace Volo.Abp.AuditLogging.EntityFrameworkCore
builder.Entity<EntityPropertyChange>(b =>
{
b.ToTable(options.TablePrefix + "EntityPropertyChanges", options.Schema);
b.ToTable(AbpAuditLoggingDbProperties.DbTablePrefix + "EntityPropertyChanges", AbpAuditLoggingDbProperties.DbSchema);
b.ConfigureByConvention();

18
modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/AbpAuditLoggingModelBuilderConfigurationOptions.cs

@ -1,18 +0,0 @@
using JetBrains.Annotations;
using Volo.Abp.EntityFrameworkCore.Modeling;
namespace Volo.Abp.Identity.EntityFrameworkCore
{
public class AbpAuditLoggingModelBuilderConfigurationOptions : AbpModelBuilderConfigurationOptions
{
public AbpAuditLoggingModelBuilderConfigurationOptions(
[NotNull] string tablePrefix,
[CanBeNull] string schema)
: base(
tablePrefix,
schema)
{
}
}
}

14
modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo/Abp/AuditLogging/MongoDB/AbpAuditLoggingMongoDbContextExtensions.cs

@ -1,25 +1,17 @@
using System;
using Volo.Abp.MongoDB;
using Volo.Abp.MongoDB;
namespace Volo.Abp.AuditLogging.MongoDB
{
public static class AbpAuditLoggingMongoDbContextExtensions
{
public static void ConfigureAuditLogging(
this IMongoModelBuilder builder,
Action<AuditLoggingMongoModelBuilderConfigurationOptions> optionsAction = null)
this IMongoModelBuilder builder)
{
Check.NotNull(builder, nameof(builder));
var options = new AuditLoggingMongoModelBuilderConfigurationOptions(
AbpAuditLoggingDbProperties.DbTablePrefix
);
optionsAction?.Invoke(options);
builder.Entity<AuditLog>(b =>
{
b.CollectionName = options.CollectionPrefix + "AuditLogs";
b.CollectionName = AbpAuditLoggingDbProperties.DbTablePrefix + "AuditLogs";
});
}
}

14
modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo/Abp/AuditLogging/MongoDB/AuditLoggingMongoModelBuilderConfigurationOptions.cs

@ -1,14 +0,0 @@
using JetBrains.Annotations;
using Volo.Abp.MongoDB;
namespace Volo.Abp.AuditLogging.MongoDB
{
public class AuditLoggingMongoModelBuilderConfigurationOptions : AbpMongoModelBuilderConfigurationOptions
{
public AuditLoggingMongoModelBuilderConfigurationOptions(
[NotNull] string collectionPrefix = "")
: base(collectionPrefix)
{
}
}
}

12
modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo/Abp/BackgroundJobs/EntityFrameworkCore/BackgroundJobsDbContextModelCreatingExtensions.cs

@ -7,8 +7,7 @@ namespace Volo.Abp.BackgroundJobs.EntityFrameworkCore
public static class BackgroundJobsDbContextModelCreatingExtensions
{
public static void ConfigureBackgroundJobs(
this ModelBuilder builder,
Action<BackgroundJobsModelBuilderConfigurationOptions> optionsAction = null)
this ModelBuilder builder)
{
Check.NotNull(builder, nameof(builder));
@ -17,16 +16,9 @@ namespace Volo.Abp.BackgroundJobs.EntityFrameworkCore
return;
}
var options = new BackgroundJobsModelBuilderConfigurationOptions(
BackgroundJobsDbProperties.DbTablePrefix,
BackgroundJobsDbProperties.DbSchema
);
optionsAction?.Invoke(options);
builder.Entity<BackgroundJobRecord>(b =>
{
b.ToTable(options.TablePrefix + "BackgroundJobs", options.Schema);
b.ToTable(BackgroundJobsDbProperties.DbTablePrefix + "BackgroundJobs", BackgroundJobsDbProperties.DbSchema);
b.ConfigureByConvention();

18
modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo/Abp/BackgroundJobs/EntityFrameworkCore/BackgroundJobsModelBuilderConfigurationOptions.cs

@ -1,18 +0,0 @@
using JetBrains.Annotations;
using Volo.Abp.EntityFrameworkCore.Modeling;
namespace Volo.Abp.BackgroundJobs.EntityFrameworkCore
{
public class BackgroundJobsModelBuilderConfigurationOptions : AbpModelBuilderConfigurationOptions
{
public BackgroundJobsModelBuilderConfigurationOptions(
[NotNull] string tablePrefix = "",
[CanBeNull] string schema = null)
: base(
tablePrefix,
schema)
{
}
}
}

16
modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/BackgroundJobsMongoDbContextExtensions.cs

@ -1,26 +1,18 @@
using System;
using Volo.Abp.MongoDB;
using Volo.Abp.MongoDB;
namespace Volo.Abp.BackgroundJobs.MongoDB
{
public static class BackgroundJobsMongoDbContextExtensions
{
public static void ConfigureBackgroundJobs(
this IMongoModelBuilder builder,
Action<AbpMongoModelBuilderConfigurationOptions> optionsAction = null)
this IMongoModelBuilder builder)
{
Check.NotNull(builder, nameof(builder));
var options = new BackgroundJobsMongoModelBuilderConfigurationOptions(
BackgroundJobsDbProperties.DbTablePrefix
);
optionsAction?.Invoke(options);
builder.Entity<BackgroundJobRecord>(b =>
{
b.CollectionName = options.CollectionPrefix + "BackgroundJobs";
b.CollectionName = BackgroundJobsDbProperties.DbTablePrefix + "BackgroundJobs";
});
}
}
}
}

14
modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/BackgroundJobsMongoModelBuilderConfigurationOptions.cs

@ -1,14 +0,0 @@
using JetBrains.Annotations;
using Volo.Abp.MongoDB;
namespace Volo.Abp.BackgroundJobs.MongoDB
{
public class BackgroundJobsMongoModelBuilderConfigurationOptions : AbpMongoModelBuilderConfigurationOptions
{
public BackgroundJobsMongoModelBuilderConfigurationOptions(
[NotNull] string collectionPrefix = "")
: base(collectionPrefix)
{
}
}
}

2
modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Dockerfile

@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/aspnet:5.0-buster-slim AS base
FROM mcr.microsoft.com/dotnet/aspnet:6.0.0-rc.1-bullseye-slim AS base
WORKDIR /app
EXPOSE 80
COPY bin/Release/publish .

15
modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.EntityFrameworkCore/Volo/Abp/BlobStoring/Database/EntityFrameworkCore/BlobStoringDbContextModelCreatingExtensions.cs

@ -1,5 +1,4 @@
using Microsoft.EntityFrameworkCore;
using System;
using Volo.Abp.EntityFrameworkCore.Modeling;
namespace Volo.Abp.BlobStoring.Database.EntityFrameworkCore
@ -7,21 +6,13 @@ namespace Volo.Abp.BlobStoring.Database.EntityFrameworkCore
public static class BlobStoringDbContextModelCreatingExtensions
{
public static void ConfigureBlobStoring(
this ModelBuilder builder,
Action<BlobStoringModelBuilderConfigurationOptions> optionsAction = null)
this ModelBuilder builder)
{
Check.NotNull(builder, nameof(builder));
var options = new BlobStoringModelBuilderConfigurationOptions(
BlobStoringDatabaseDbProperties.DbTablePrefix,
BlobStoringDatabaseDbProperties.DbSchema
);
optionsAction?.Invoke(options);
builder.Entity<DatabaseBlobContainer>(b =>
{
b.ToTable(options.TablePrefix + "BlobContainers", options.Schema);
b.ToTable(BlobStoringDatabaseDbProperties.DbTablePrefix + "BlobContainers", BlobStoringDatabaseDbProperties.DbSchema);
b.ConfigureByConvention();
@ -36,7 +27,7 @@ namespace Volo.Abp.BlobStoring.Database.EntityFrameworkCore
builder.Entity<DatabaseBlob>(b =>
{
b.ToTable(options.TablePrefix + "Blobs", options.Schema);
b.ToTable(BlobStoringDatabaseDbProperties.DbTablePrefix + "Blobs", BlobStoringDatabaseDbProperties.DbSchema);
b.ConfigureByConvention();

18
modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.EntityFrameworkCore/Volo/Abp/BlobStoring/Database/EntityFrameworkCore/BlobStoringModelBuilderConfigurationOptions.cs

@ -1,18 +0,0 @@
using JetBrains.Annotations;
using Volo.Abp.EntityFrameworkCore.Modeling;
namespace Volo.Abp.BlobStoring.Database.EntityFrameworkCore
{
public class BlobStoringModelBuilderConfigurationOptions : AbpModelBuilderConfigurationOptions
{
public BlobStoringModelBuilderConfigurationOptions(
[NotNull] string tablePrefix = "",
[CanBeNull] string schema = null)
: base(
tablePrefix,
schema)
{
}
}
}

18
modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.MongoDB/Volo/Abp/BlobStoring/Database/MongoDB/BlobStoringMongoDbContextExtensions.cs

@ -1,31 +1,23 @@
using System;
using Volo.Abp.MongoDB;
using Volo.Abp.MongoDB;
namespace Volo.Abp.BlobStoring.Database.MongoDB
{
public static class BlobStoringMongoDbContextExtensions
{
public static void ConfigureBlobStoring(
this IMongoModelBuilder builder,
Action<AbpMongoModelBuilderConfigurationOptions> optionsAction = null)
this IMongoModelBuilder builder)
{
Check.NotNull(builder, nameof(builder));
var options = new BlobStoringMongoModelBuilderConfigurationOptions(
BlobStoringDatabaseDbProperties.DbTablePrefix
);
optionsAction?.Invoke(options);
builder.Entity<DatabaseBlobContainer>(b =>
{
b.CollectionName = options.CollectionPrefix + "BlobContainers";
b.CollectionName = BlobStoringDatabaseDbProperties.DbTablePrefix + "BlobContainers";
});
builder.Entity<DatabaseBlob>(b =>
{
b.CollectionName = options.CollectionPrefix + "Blobs";
b.CollectionName = BlobStoringDatabaseDbProperties.DbTablePrefix + "Blobs";
});
}
}
}
}

14
modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.MongoDB/Volo/Abp/BlobStoring/Database/MongoDB/BlobStoringMongoModelBuilderConfigurationOptions.cs

@ -1,14 +0,0 @@
using JetBrains.Annotations;
using Volo.Abp.MongoDB;
namespace Volo.Abp.BlobStoring.Database.MongoDB
{
public class BlobStoringMongoModelBuilderConfigurationOptions : AbpMongoModelBuilderConfigurationOptions
{
public BlobStoringMongoModelBuilderConfigurationOptions(
[NotNull] string collectionPrefix = "")
: base(collectionPrefix)
{
}
}
}

6
modules/blogging/app/Volo.BloggingTestApp/BloggingTestAppModule.cs

@ -31,6 +31,7 @@ using Volo.Abp.Identity;
using Volo.Abp.Identity.Web;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement;
using Volo.Abp.PermissionManagement.HttpApi;
using Volo.Abp.PermissionManagement.Identity;
using Volo.Abp.Threading;
using Volo.Abp.UI;
@ -45,7 +46,9 @@ namespace Volo.BloggingTestApp
[DependsOn(
typeof(BloggingWebModule),
typeof(BloggingApplicationModule),
typeof(BloggingHttpApiModule),
typeof(BloggingAdminWebModule),
typeof(BloggingAdminHttpApiModule),
typeof(BloggingAdminApplicationModule),
#if MONGODB
typeof(BloggingTestAppMongoDbModule),
@ -53,11 +56,14 @@ namespace Volo.BloggingTestApp
typeof(BloggingTestAppEntityFrameworkCoreModule),
#endif
typeof(AbpAccountWebModule),
typeof(AbpAccountHttpApiModule),
typeof(AbpAccountApplicationModule),
typeof(AbpIdentityWebModule),
typeof(AbpIdentityHttpApiModule),
typeof(AbpIdentityApplicationModule),
typeof(AbpPermissionManagementDomainIdentityModule),
typeof(AbpPermissionManagementApplicationModule),
typeof(AbpPermissionManagementHttpApiModule),
typeof(BlobStoringDatabaseDomainModule),
typeof(AbpAutofacModule),
typeof(AbpAspNetCoreMvcUiBasicThemeModule)

11
modules/blogging/app/Volo.BloggingTestApp/Volo.BloggingTestApp.csproj

@ -15,12 +15,14 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Serilog.AspNetCore" Version="3.4.0" />
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.6.3" />
<PackageReference Include="Serilog.AspNetCore" Version="4.1.0" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Volo.Blogging.Admin.HttpApi\Volo.Blogging.Admin.HttpApi.csproj" />
<ProjectReference Include="..\..\src\Volo.Blogging.HttpApi\Volo.Blogging.HttpApi.csproj" />
<ProjectReference Include="..\Volo.BloggingTestApp.EntityFrameworkCore\Volo.BloggingTestApp.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\src\Volo.Blogging.Application\Volo.Blogging.Application.csproj" />
<ProjectReference Include="..\..\src\Volo.Blogging.Web\Volo.Blogging.Web.csproj" />
@ -30,9 +32,12 @@
<ProjectReference Include="..\..\..\..\modules\basic-theme\src\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj" />
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.Application\Volo.Abp.Identity.Application.csproj" />
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.Web\Volo.Abp.Identity.Web.csproj" />
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.HttpApi\Volo.Abp.Identity.HttpApi.csproj" />
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.PermissionManagement.Domain.Identity\Volo.Abp.PermissionManagement.Domain.Identity.csproj" />
<ProjectReference Include="..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.Application\Volo.Abp.PermissionManagement.Application.csproj" />
<ProjectReference Include="..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.HttpApi\Volo.Abp.PermissionManagement.HttpApi.csproj" />
<ProjectReference Include="..\..\..\..\modules\account\src\Volo.Abp.Account.Web\Volo.Abp.Account.Web.csproj" />
<ProjectReference Include="..\..\..\..\modules\account\src\Volo.Abp.Account.HttpApi\Volo.Abp.Account.HttpApi.csproj" />
<ProjectReference Include="..\..\..\..\modules\account\src\Volo.Abp.Account.Application\Volo.Abp.Account.Application.csproj" />
<ProjectReference Include="..\..\..\..\modules\blob-storing-database\src\Volo.Abp.BlobStoring.Database.Domain\Volo.Abp.BlobStoring.Database.Domain.csproj" />
</ItemGroup>

3123
modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/sweetalert2/sweetalert2.all.js

File diff suppressed because one or more lines are too long

2
modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/sweetalert2/sweetalert2.all.min.js

File diff suppressed because one or more lines are too long

1319
modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/sweetalert2/sweetalert2.css

File diff suppressed because it is too large

3121
modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/sweetalert2/sweetalert2.js

File diff suppressed because it is too large

1
modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/sweetalert2/sweetalert2.min.css

File diff suppressed because one or more lines are too long

1
modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/sweetalert2/sweetalert2.min.js

File diff suppressed because one or more lines are too long

11
modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Files/ImageFormatHelper.cs

@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.Drawing.Imaging;
using System.IO;
using System.Runtime.InteropServices;
namespace Volo.Blogging.Areas.Blog.Helpers
{
@ -16,8 +17,14 @@ namespace Volo.Blogging.Areas.Blog.Helpers
public static bool IsValidImage(byte[] fileBytes, ICollection<ImageFormat> validFormats)
{
var imageFormat = GetImageRawFormat(fileBytes);
return validFormats.Contains(imageFormat);
// System.Drawing only works on windows => https://docs.microsoft.com/en-us/dotnet/api/system.drawing.image?view=net-5.0#remarks
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
var imageFormat = GetImageRawFormat(fileBytes);
return validFormats.Contains(imageFormat);
}
return true;
}
}
}

25
modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/EntityFrameworkCore/BloggingDbContextModelBuilderExtensions.cs

@ -1,5 +1,4 @@
using System;
using JetBrains.Annotations;
using JetBrains.Annotations;
using Microsoft.EntityFrameworkCore;
using Volo.Abp;
using Volo.Abp.EntityFrameworkCore.Modeling;
@ -15,8 +14,7 @@ namespace Volo.Blogging.EntityFrameworkCore
public static class BloggingDbContextModelBuilderExtensions
{
public static void ConfigureBlogging(
[NotNull] this ModelBuilder builder,
Action<BloggingModelBuilderConfigurationOptions> optionsAction = null)
[NotNull] this ModelBuilder builder)
{
Check.NotNull(builder, nameof(builder));
@ -25,16 +23,9 @@ namespace Volo.Blogging.EntityFrameworkCore
return;
}
var options = new BloggingModelBuilderConfigurationOptions(
BloggingDbProperties.DbTablePrefix,
BloggingDbProperties.DbSchema
);
optionsAction?.Invoke(options);
builder.Entity<BlogUser>(b =>
{
b.ToTable(options.TablePrefix + "Users", options.Schema);
b.ToTable(BloggingDbProperties.DbTablePrefix + "Users", BloggingDbProperties.DbSchema);
b.ConfigureByConvention();
b.ConfigureAbpUser();
@ -44,7 +35,7 @@ namespace Volo.Blogging.EntityFrameworkCore
builder.Entity<Blog>(b =>
{
b.ToTable(options.TablePrefix + "Blogs", options.Schema);
b.ToTable(BloggingDbProperties.DbTablePrefix + "Blogs", BloggingDbProperties.DbSchema);
b.ConfigureByConvention();
@ -57,7 +48,7 @@ namespace Volo.Blogging.EntityFrameworkCore
builder.Entity<Post>(b =>
{
b.ToTable(options.TablePrefix + "Posts", options.Schema);
b.ToTable(BloggingDbProperties.DbTablePrefix + "Posts", BloggingDbProperties.DbSchema);
b.ConfigureByConvention();
@ -77,7 +68,7 @@ namespace Volo.Blogging.EntityFrameworkCore
builder.Entity<Comment>(b =>
{
b.ToTable(options.TablePrefix + "Comments", options.Schema);
b.ToTable(BloggingDbProperties.DbTablePrefix + "Comments", BloggingDbProperties.DbSchema);
b.ConfigureByConvention();
@ -93,7 +84,7 @@ namespace Volo.Blogging.EntityFrameworkCore
builder.Entity<Tag>(b =>
{
b.ToTable(options.TablePrefix + "Tags", options.Schema);
b.ToTable(BloggingDbProperties.DbTablePrefix + "Tags", BloggingDbProperties.DbSchema);
b.ConfigureByConvention();
@ -108,7 +99,7 @@ namespace Volo.Blogging.EntityFrameworkCore
builder.Entity<PostTag>(b =>
{
b.ToTable(options.TablePrefix + "PostTags", options.Schema);
b.ToTable(BloggingDbProperties.DbTablePrefix + "PostTags", BloggingDbProperties.DbSchema);
b.ConfigureByConvention();

15
modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/EntityFrameworkCore/BloggingModelBuilderConfigurationOptions.cs

@ -1,15 +0,0 @@
using JetBrains.Annotations;
using Volo.Abp.EntityFrameworkCore.Modeling;
namespace Volo.Blogging.EntityFrameworkCore
{
public class BloggingModelBuilderConfigurationOptions : AbpModelBuilderConfigurationOptions
{
public BloggingModelBuilderConfigurationOptions(
[NotNull] string tablePrefix = "",
[CanBeNull] string schema = null)
: base(tablePrefix, schema)
{
}
}
}

22
modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/MongoDB/BloggingMongoDbContextExtensions.cs

@ -1,5 +1,4 @@
using System;
using Volo.Abp;
using Volo.Abp;
using Volo.Abp.MongoDB;
using Volo.Blogging.Blogs;
using Volo.Blogging.Comments;
@ -11,40 +10,33 @@ namespace Volo.Blogging.MongoDB
public static class BloggingMongoDbContextExtensions
{
public static void ConfigureBlogging(
this IMongoModelBuilder builder,
Action<AbpMongoModelBuilderConfigurationOptions> optionsAction = null)
this IMongoModelBuilder builder)
{
Check.NotNull(builder, nameof(builder));
var options = new BloggingMongoModelBuilderConfigurationOptions(
BloggingDbProperties.DbTablePrefix
);
optionsAction?.Invoke(options);
builder.Entity<BlogUser>(b =>
{
b.CollectionName = options.CollectionPrefix + "Users";
b.CollectionName = BloggingDbProperties.DbTablePrefix + "Users";
});
builder.Entity<Blog>(b =>
{
b.CollectionName = options.CollectionPrefix + "Blogs";
b.CollectionName = BloggingDbProperties.DbTablePrefix + "Blogs";
});
builder.Entity<Post>(b =>
{
b.CollectionName = options.CollectionPrefix + "Posts";
b.CollectionName = BloggingDbProperties.DbTablePrefix + "Posts";
});
builder.Entity<Tagging.Tag>(b =>
{
b.CollectionName = options.CollectionPrefix + "Tags";
b.CollectionName = BloggingDbProperties.DbTablePrefix + "Tags";
});
builder.Entity<Comment>(b =>
{
b.CollectionName = options.CollectionPrefix + "Comments";
b.CollectionName = BloggingDbProperties.DbTablePrefix + "Comments";
});
}
}

14
modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/MongoDB/BloggingMongoModelBuilderConfigurationOptions.cs

@ -1,14 +0,0 @@
using JetBrains.Annotations;
using Volo.Abp.MongoDB;
namespace Volo.Blogging.MongoDB
{
public class BloggingMongoModelBuilderConfigurationOptions : AbpMongoModelBuilderConfigurationOptions
{
public BloggingMongoModelBuilderConfigurationOptions(
[NotNull] string collectionPrefix = "")
: base(collectionPrefix)
{
}
}
}

1
modules/cms-kit/host/Volo.CmsKit.IdentityServer/CmsKitIdentityServerModule.cs

@ -49,6 +49,7 @@ namespace Volo.CmsKit
[DependsOn(
typeof(AbpAccountWebIdentityServerModule),
typeof(AbpAccountApplicationModule),
typeof(AbpAccountHttpApiModule),
typeof(AbpAspNetCoreMvcUiMultiTenancyModule),
typeof(AbpAspNetCoreMvcModule),
typeof(AbpAspNetCoreMvcUiBasicThemeModule),

1
modules/cms-kit/host/Volo.CmsKit.IdentityServer/Volo.CmsKit.IdentityServer.csproj

@ -23,6 +23,7 @@
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.AspNetCore.Serilog\Volo.Abp.AspNetCore.Serilog.csproj" />
<ProjectReference Include="..\..\..\..\modules\account\src\Volo.Abp.Account.Web.IdentityServer\Volo.Abp.Account.Web.IdentityServer.csproj" />
<ProjectReference Include="..\..\..\..\modules\account\src\Volo.Abp.Account.Application\Volo.Abp.Account.Application.csproj" />
<ProjectReference Include="..\..\..\..\modules\account\src\Volo.Abp.Account.HttpApi\Volo.Abp.Account.HttpApi.csproj" />
<ProjectReference Include="..\..\..\..\modules\setting-management\src\Volo.Abp.SettingManagement.EntityFrameworkCore\Volo.Abp.SettingManagement.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\modules\audit-logging\src\Volo.Abp.AuditLogging.EntityFrameworkCore\Volo.Abp.AuditLogging.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\modules\identityserver\src\Volo.Abp.IdentityServer.EntityFrameworkCore\Volo.Abp.IdentityServer.EntityFrameworkCore.csproj" />

3123
modules/cms-kit/host/Volo.CmsKit.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.all.js

File diff suppressed because one or more lines are too long

2
modules/cms-kit/host/Volo.CmsKit.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.all.min.js

File diff suppressed because one or more lines are too long

1319
modules/cms-kit/host/Volo.CmsKit.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.css

File diff suppressed because it is too large

3121
modules/cms-kit/host/Volo.CmsKit.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.js

File diff suppressed because it is too large

1
modules/cms-kit/host/Volo.CmsKit.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.min.css

File diff suppressed because one or more lines are too long

1
modules/cms-kit/host/Volo.CmsKit.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.min.js

File diff suppressed because one or more lines are too long

3123
modules/cms-kit/host/Volo.CmsKit.Web.Host/wwwroot/libs/sweetalert2/sweetalert2.all.js

File diff suppressed because one or more lines are too long

2
modules/cms-kit/host/Volo.CmsKit.Web.Host/wwwroot/libs/sweetalert2/sweetalert2.all.min.js

File diff suppressed because one or more lines are too long

1319
modules/cms-kit/host/Volo.CmsKit.Web.Host/wwwroot/libs/sweetalert2/sweetalert2.css

File diff suppressed because it is too large

3121
modules/cms-kit/host/Volo.CmsKit.Web.Host/wwwroot/libs/sweetalert2/sweetalert2.js

File diff suppressed because it is too large

1
modules/cms-kit/host/Volo.CmsKit.Web.Host/wwwroot/libs/sweetalert2/sweetalert2.min.css

File diff suppressed because one or more lines are too long

1
modules/cms-kit/host/Volo.CmsKit.Web.Host/wwwroot/libs/sweetalert2/sweetalert2.min.js

File diff suppressed because one or more lines are too long

11
modules/cms-kit/host/Volo.CmsKit.Web.Unified/CmsKitWebUnifiedModule.cs

@ -40,6 +40,7 @@ using Volo.Abp.VirtualFileSystem;
using Volo.CmsKit.Admin.Web;
using Volo.CmsKit.Public.Web;
using System;
using Volo.Abp.PermissionManagement.HttpApi;
using Volo.CmsKit.Tags;
using Volo.CmsKit.Comments;
using Volo.CmsKit.MediaDescriptors;
@ -51,24 +52,30 @@ namespace Volo.CmsKit
[DependsOn(
typeof(CmsKitWebModule),
typeof(CmsKitApplicationModule),
typeof(CmsKitHttpApiModule),
typeof(CmsKitEntityFrameworkCoreModule),
typeof(AbpAuditLoggingEntityFrameworkCoreModule),
typeof(AbpAutofacModule),
typeof(AbpAccountWebModule),
typeof(AbpAccountApplicationModule),
typeof(AbpAccountHttpApiModule),
typeof(AbpEntityFrameworkCoreSqlServerModule),
typeof(AbpSettingManagementEntityFrameworkCoreModule),
typeof(AbpPermissionManagementEntityFrameworkCoreModule),
typeof(AbpPermissionManagementApplicationModule),
typeof(AbpPermissionManagementHttpApiModule),
typeof(AbpIdentityWebModule),
typeof(AbpIdentityApplicationModule),
typeof(AbpIdentityHttpApiModule),
typeof(AbpIdentityEntityFrameworkCoreModule),
typeof(AbpPermissionManagementDomainIdentityModule),
typeof(AbpFeatureManagementApplicationModule),
typeof(AbpFeatureManagementHttpApiModule),
typeof(AbpFeatureManagementEntityFrameworkCoreModule),
typeof(AbpFeatureManagementWebModule),
typeof(AbpTenantManagementWebModule),
typeof(AbpTenantManagementApplicationModule),
typeof(AbpTenantManagementHttpApiModule),
typeof(AbpTenantManagementEntityFrameworkCoreModule),
typeof(AbpAspNetCoreMvcUiBasicThemeModule),
typeof(AbpAspNetCoreSerilogModule),
@ -161,11 +168,11 @@ namespace Volo.CmsKit
{
options.EntityTypes.Add(new MediaDescriptorDefinition("quote"));
});
Configure<CmsKitReactionOptions>(options =>
{
options.EntityTypes.Add(
new ReactionEntityTypeDefinition("quote",
new ReactionEntityTypeDefinition("quote",
reactions: new[]
{
new ReactionDefinition(StandardReactions.ThumbsUp),

6
modules/cms-kit/host/Volo.CmsKit.Web.Unified/Volo.CmsKit.Web.Unified.csproj

@ -19,17 +19,22 @@
<ProjectReference Include="..\..\..\..\modules\audit-logging\src\Volo.Abp.AuditLogging.EntityFrameworkCore\Volo.Abp.AuditLogging.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\modules\account\src\Volo.Abp.Account.Web\Volo.Abp.Account.Web.csproj" />
<ProjectReference Include="..\..\..\..\modules\account\src\Volo.Abp.Account.Application\Volo.Abp.Account.Application.csproj" />
<ProjectReference Include="..\..\..\..\modules\account\src\Volo.Abp.Account.HttpApi\Volo.Abp.Account.HttpApi.csproj" />
<ProjectReference Include="..\..\..\..\modules\setting-management\src\Volo.Abp.SettingManagement.EntityFrameworkCore\Volo.Abp.SettingManagement.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.Application\Volo.Abp.PermissionManagement.Application.csproj" />
<ProjectReference Include="..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.HttpApi\Volo.Abp.PermissionManagement.HttpApi.csproj" />
<ProjectReference Include="..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.EntityFrameworkCore\Volo.Abp.PermissionManagement.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.Application\Volo.Abp.Identity.Application.csproj" />
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.HttpApi\Volo.Abp.Identity.HttpApi.csproj" />
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.Web\Volo.Abp.Identity.Web.csproj" />
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.EntityFrameworkCore\Volo.Abp.Identity.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.PermissionManagement.Domain.Identity\Volo.Abp.PermissionManagement.Domain.Identity.csproj" />
<ProjectReference Include="..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.EntityFrameworkCore\Volo.Abp.FeatureManagement.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.Application\Volo.Abp.FeatureManagement.Application.csproj" />
<ProjectReference Include="..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.HttpApi\Volo.Abp.FeatureManagement.HttpApi.csproj" />
<ProjectReference Include="..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.Web\Volo.Abp.FeatureManagement.Web.csproj" />
<ProjectReference Include="..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.Application\Volo.Abp.TenantManagement.Application.csproj" />
<ProjectReference Include="..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.HttpApi\Volo.Abp.TenantManagement.HttpApi.csproj" />
<ProjectReference Include="..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.Web\Volo.Abp.TenantManagement.Web.csproj" />
<ProjectReference Include="..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.EntityFrameworkCore\Volo.Abp.TenantManagement.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\modules\blob-storing-database\src\Volo.Abp.BlobStoring.Database.EntityFrameworkCore\Volo.Abp.BlobStoring.Database.EntityFrameworkCore.csproj" />
@ -37,6 +42,7 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Volo.CmsKit.Application\Volo.CmsKit.Application.csproj" />
<ProjectReference Include="..\..\src\Volo.CmsKit.HttpApi\Volo.CmsKit.HttpApi.csproj" />
<ProjectReference Include="..\..\src\Volo.CmsKit.EntityFrameworkCore\Volo.CmsKit.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\src\Volo.CmsKit.Application\Volo.CmsKit.Application.csproj" />
<ProjectReference Include="..\..\src\Volo.CmsKit.Web\Volo.CmsKit.Web.csproj" />

3123
modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/sweetalert2/sweetalert2.all.js

File diff suppressed because one or more lines are too long

2
modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/sweetalert2/sweetalert2.all.min.js

File diff suppressed because one or more lines are too long

1319
modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/sweetalert2/sweetalert2.css

File diff suppressed because it is too large

3121
modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/sweetalert2/sweetalert2.js

File diff suppressed because it is too large

1
modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/sweetalert2/sweetalert2.min.css

File diff suppressed because one or more lines are too long

1
modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/sweetalert2/sweetalert2.min.js

File diff suppressed because one or more lines are too long

35
modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitDbContextModelCreatingExtensions.cs

@ -1,5 +1,4 @@
using Microsoft.EntityFrameworkCore;
using System;
using Volo.Abp;
using Volo.Abp.EntityFrameworkCore.Modeling;
using Volo.Abp.GlobalFeatures;
@ -20,23 +19,15 @@ namespace Volo.CmsKit.EntityFrameworkCore
public static class CmsKitDbContextModelCreatingExtensions
{
public static void ConfigureCmsKit(
this ModelBuilder builder,
Action<CmsKitModelBuilderConfigurationOptions> optionsAction = null)
this ModelBuilder builder)
{
Check.NotNull(builder, nameof(builder));
var options = new CmsKitModelBuilderConfigurationOptions(
CmsKitDbProperties.DbTablePrefix,
CmsKitDbProperties.DbSchema
);
optionsAction?.Invoke(options);
if (GlobalFeatureManager.Instance.IsEnabled<CmsUserFeature>())
{
builder.Entity<CmsUser>(b =>
{
b.ToTable(options.TablePrefix + "Users", options.Schema);
b.ToTable(CmsKitDbProperties.DbTablePrefix + "Users", CmsKitDbProperties.DbSchema);
b.ConfigureByConvention();
b.ConfigureAbpUser();
@ -56,7 +47,7 @@ namespace Volo.CmsKit.EntityFrameworkCore
{
builder.Entity<UserReaction>(b =>
{
b.ToTable(options.TablePrefix + "UserReactions", options.Schema);
b.ToTable(CmsKitDbProperties.DbTablePrefix + "UserReactions", CmsKitDbProperties.DbSchema);
b.ConfigureByConvention();
@ -79,7 +70,7 @@ namespace Volo.CmsKit.EntityFrameworkCore
{
builder.Entity<Comment>(b =>
{
b.ToTable(options.TablePrefix + "Comments", options.Schema);
b.ToTable(CmsKitDbProperties.DbTablePrefix + "Comments", CmsKitDbProperties.DbSchema);
b.ConfigureByConvention();
@ -103,7 +94,7 @@ namespace Volo.CmsKit.EntityFrameworkCore
{
builder.Entity<Rating>(r =>
{
r.ToTable(options.TablePrefix + "Ratings", options.Schema);
r.ToTable(CmsKitDbProperties.DbTablePrefix + "Ratings", CmsKitDbProperties.DbSchema);
r.ConfigureByConvention();
@ -125,7 +116,7 @@ namespace Volo.CmsKit.EntityFrameworkCore
{
builder.Entity<Tag>(b =>
{
b.ToTable(options.TablePrefix + "Tags", options.Schema);
b.ToTable(CmsKitDbProperties.DbTablePrefix + "Tags", CmsKitDbProperties.DbSchema);
b.ConfigureByConvention();
@ -143,7 +134,7 @@ namespace Volo.CmsKit.EntityFrameworkCore
builder.Entity<EntityTag>(b =>
{
b.ToTable(options.TablePrefix + "EntityTags", options.Schema);
b.ToTable(CmsKitDbProperties.DbTablePrefix + "EntityTags", CmsKitDbProperties.DbSchema);
b.ConfigureByConvention();
@ -167,7 +158,7 @@ namespace Volo.CmsKit.EntityFrameworkCore
{
builder.Entity<Page>(b =>
{
b.ToTable(options.TablePrefix + "Pages", options.Schema);
b.ToTable(CmsKitDbProperties.DbTablePrefix + "Pages", CmsKitDbProperties.DbSchema);
b.ConfigureByConvention();
@ -189,7 +180,7 @@ namespace Volo.CmsKit.EntityFrameworkCore
{
builder.Entity<Blog>(b =>
{
b.ToTable(options.TablePrefix + "Blogs", options.Schema);
b.ToTable(CmsKitDbProperties.DbTablePrefix + "Blogs", CmsKitDbProperties.DbSchema);
b.ConfigureByConvention();
@ -202,7 +193,7 @@ namespace Volo.CmsKit.EntityFrameworkCore
builder.Entity<BlogPost>(b =>
{
b.ToTable(options.TablePrefix + "BlogPosts", options.Schema);
b.ToTable(CmsKitDbProperties.DbTablePrefix + "BlogPosts", CmsKitDbProperties.DbSchema);
b.ConfigureByConvention();
@ -219,7 +210,7 @@ namespace Volo.CmsKit.EntityFrameworkCore
builder.Entity<BlogFeature>(b =>
{
b.ToTable(options.TablePrefix + "BlogFeatures", options.Schema);
b.ToTable(CmsKitDbProperties.DbTablePrefix + "BlogFeatures", CmsKitDbProperties.DbSchema);
b.ConfigureByConvention();
@ -239,7 +230,7 @@ namespace Volo.CmsKit.EntityFrameworkCore
{
builder.Entity<MediaDescriptor>(b =>
{
b.ToTable(options.TablePrefix + "MediaDescriptors", options.Schema);
b.ToTable(CmsKitDbProperties.DbTablePrefix + "MediaDescriptors", CmsKitDbProperties.DbSchema);
b.ConfigureByConvention();
@ -260,7 +251,7 @@ namespace Volo.CmsKit.EntityFrameworkCore
{
builder.Entity<MenuItem>(b =>
{
b.ToTable(options.TablePrefix + "MenuItems", options.Schema);
b.ToTable(CmsKitDbProperties.DbTablePrefix + "MenuItems", CmsKitDbProperties.DbSchema);
b.ConfigureByConvention();

18
modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitModelBuilderConfigurationOptions.cs

@ -1,18 +0,0 @@
using JetBrains.Annotations;
using Volo.Abp.EntityFrameworkCore.Modeling;
namespace Volo.CmsKit.EntityFrameworkCore
{
public class CmsKitModelBuilderConfigurationOptions : AbpModelBuilderConfigurationOptions
{
public CmsKitModelBuilderConfigurationOptions(
[NotNull] string tablePrefix = "",
[CanBeNull] string schema = null)
: base(
tablePrefix,
schema)
{
}
}
}

12
modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoDbContextExtensions.cs

@ -1,5 +1,4 @@
using System;
using Volo.Abp;
using Volo.Abp;
using Volo.Abp.MongoDB;
using Volo.CmsKit.Blogs;
using Volo.CmsKit.Comments;
@ -16,17 +15,10 @@ namespace Volo.CmsKit.MongoDB
public static class CmsKitMongoDbContextExtensions
{
public static void ConfigureCmsKit(
this IMongoModelBuilder builder,
Action<AbpMongoModelBuilderConfigurationOptions> optionsAction = null)
this IMongoModelBuilder builder)
{
Check.NotNull(builder, nameof(builder));
var options = new CmsKitMongoModelBuilderConfigurationOptions(
CmsKitDbProperties.DbTablePrefix
);
optionsAction?.Invoke(options);
builder.Entity<CmsUser>(x =>
{
x.CollectionName = CmsKitDbProperties.DbTablePrefix + "Users";

14
modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoModelBuilderConfigurationOptions.cs

@ -1,14 +0,0 @@
using JetBrains.Annotations;
using Volo.Abp.MongoDB;
namespace Volo.CmsKit.MongoDB
{
public class CmsKitMongoModelBuilderConfigurationOptions : AbpMongoModelBuilderConfigurationOptions
{
public CmsKitMongoModelBuilderConfigurationOptions(
[NotNull] string collectionPrefix = "")
: base(collectionPrefix)
{
}
}
}

5
modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/_ViewStart.cshtml

@ -0,0 +1,5 @@
@using Volo.Abp.AspNetCore.Mvc.UI.Theming
@inject IThemeManager ThemeManager
@{
Layout = ThemeManager.CurrentTheme.GetPublicLayout();
}

5
modules/docs/app/VoloDocs.Web/VoloDocs.Web.csproj

@ -24,18 +24,23 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Volo.Docs.Application\Volo.Docs.Application.csproj" />
<ProjectReference Include="..\..\src\Volo.Docs.HttpApi\Volo.Docs.HttpApi.csproj" />
<ProjectReference Include="..\..\src\Volo.Docs.Admin.Application\Volo.Docs.Admin.Application.csproj" />
<ProjectReference Include="..\..\src\Volo.Docs.Admin.HttpApi\Volo.Docs.Admin.HttpApi.csproj" />
<ProjectReference Include="..\..\src\Volo.Docs.Web\Volo.Docs.Web.csproj" />
<ProjectReference Include="..\..\src\Volo.Docs.Admin.Web\Volo.Docs.Admin.Web.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
<ProjectReference Include="..\..\..\..\modules\basic-theme\src\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj" />
<ProjectReference Include="..\VoloDocs.EntityFrameworkCore\VoloDocs.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.Application\Volo.Abp.Identity.Application.csproj" />
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.HttpApi\Volo.Abp.Identity.HttpApi.csproj" />
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.Web\Volo.Abp.Identity.Web.csproj" />
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.PermissionManagement.Domain.Identity\Volo.Abp.PermissionManagement.Domain.Identity.csproj" />
<ProjectReference Include="..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.Application\Volo.Abp.PermissionManagement.Application.csproj" />
<ProjectReference Include="..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.HttpApi\Volo.Abp.PermissionManagement.HttpApi.csproj" />
<ProjectReference Include="..\..\..\..\modules\account\src\Volo.Abp.Account.Web\Volo.Abp.Account.Web.csproj" />
<ProjectReference Include="..\..\..\..\modules\account\src\Volo.Abp.Account.Application\Volo.Abp.Account.Application.csproj" />
<ProjectReference Include="..\..\..\..\modules\account\src\Volo.Abp.Account.HttpApi\Volo.Abp.Account.HttpApi.csproj" />
</ItemGroup>
<ItemGroup>

10
modules/docs/app/VoloDocs.Web/VoloDocsWebModule.cs

@ -32,6 +32,7 @@ using Localization.Resources.AbpUi;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Hosting;
using Volo.Abp.Account;
using Volo.Abp.PermissionManagement.HttpApi;
using Volo.Abp.Validation.Localization;
using Volo.Docs.Documents.FullSearch.Elastic;
@ -41,15 +42,20 @@ namespace VoloDocs.Web
typeof(DocsWebModule),
typeof(DocsAdminWebModule),
typeof(DocsApplicationModule),
typeof(DocsHttpApiModule),
typeof(DocsAdminApplicationModule),
typeof(DocsAdminHttpApiModule),
typeof(VoloDocsEntityFrameworkCoreModule),
typeof(AbpAutofacModule),
typeof(AbpAccountWebModule),
typeof(AbpAccountApplicationModule),
typeof(AbpAccountHttpApiModule),
typeof(AbpIdentityWebModule),
typeof(AbpIdentityApplicationModule),
typeof(AbpIdentityHttpApiModule),
typeof(AbpPermissionManagementDomainIdentityModule),
typeof(AbpPermissionManagementApplicationModule),
typeof(AbpPermissionManagementHttpApiModule),
typeof(AbpAspNetCoreMvcUiBasicThemeModule)
)]
public class VoloDocsWebModule : AbpModule
@ -113,7 +119,7 @@ namespace VoloDocs.Web
options.DocInclusionPredicate((docName, description) => true);
options.CustomSchemaIds(type => type.FullName);
});
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<VoloDocsWebModule>("VoloDocs.Web");
@ -170,7 +176,7 @@ namespace VoloDocs.Web
});
app.UseStatusCodePagesWithReExecute("/error/{0}");
//app.UseMiddleware<GlobalExceptionHandlerMiddleware>();
app.UseConfiguredEndpoints();

3123
modules/docs/app/VoloDocs.Web/wwwroot/libs/sweetalert2/sweetalert2.all.js

File diff suppressed because one or more lines are too long

2
modules/docs/app/VoloDocs.Web/wwwroot/libs/sweetalert2/sweetalert2.all.min.js

File diff suppressed because one or more lines are too long

1319
modules/docs/app/VoloDocs.Web/wwwroot/libs/sweetalert2/sweetalert2.css

File diff suppressed because it is too large

3121
modules/docs/app/VoloDocs.Web/wwwroot/libs/sweetalert2/sweetalert2.js

File diff suppressed because it is too large

1
modules/docs/app/VoloDocs.Web/wwwroot/libs/sweetalert2/sweetalert2.min.css

File diff suppressed because one or more lines are too long

1
modules/docs/app/VoloDocs.Web/wwwroot/libs/sweetalert2/sweetalert2.min.js

File diff suppressed because one or more lines are too long

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save