diff --git a/framework/Volo.Abp.sln b/framework/Volo.Abp.sln
index 963472ada8..8c2670fa27 100644
--- a/framework/Volo.Abp.sln
+++ b/framework/Volo.Abp.sln
@@ -359,6 +359,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Json.Tests", "test
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Http.Tests", "test\Volo.Abp.Http.Tests\Volo.Abp.Http.Tests.csproj", "{A37BFEB5-7C57-4CDC-93B8-B5CE4BB9ACE1}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.EventBus.Abstractions", "src\Volo.Abp.EventBus.Abstractions\Volo.Abp.EventBus.Abstractions.csproj", "{8FDB3BF7-AD89-43F6-8DEB-C3E29B8801FE}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -1069,6 +1071,10 @@ Global
{A37BFEB5-7C57-4CDC-93B8-B5CE4BB9ACE1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A37BFEB5-7C57-4CDC-93B8-B5CE4BB9ACE1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A37BFEB5-7C57-4CDC-93B8-B5CE4BB9ACE1}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8FDB3BF7-AD89-43F6-8DEB-C3E29B8801FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8FDB3BF7-AD89-43F6-8DEB-C3E29B8801FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8FDB3BF7-AD89-43F6-8DEB-C3E29B8801FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8FDB3BF7-AD89-43F6-8DEB-C3E29B8801FE}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -1250,6 +1256,7 @@ Global
{DD9519E0-5A68-48DC-A051-7BF2AC922F3E} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6}
{00D07595-993C-40FC-BD90-0DD6331414D3} = {447C8A77-E5F0-4538-8687-7383196D04EA}
{A37BFEB5-7C57-4CDC-93B8-B5CE4BB9ACE1} = {447C8A77-E5F0-4538-8687-7383196D04EA}
+ {8FDB3BF7-AD89-43F6-8DEB-C3E29B8801FE} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {BB97ECF4-9A84-433F-A80B-2A3285BDD1D5}
diff --git a/framework/src/Volo.Abp.EventBus.Abstractions/FodyWeavers.xml b/framework/src/Volo.Abp.EventBus.Abstractions/FodyWeavers.xml
new file mode 100644
index 0000000000..bc5a74a236
--- /dev/null
+++ b/framework/src/Volo.Abp.EventBus.Abstractions/FodyWeavers.xml
@@ -0,0 +1,3 @@
+
+
+
diff --git a/framework/src/Volo.Abp.EventBus.Abstractions/FodyWeavers.xsd b/framework/src/Volo.Abp.EventBus.Abstractions/FodyWeavers.xsd
new file mode 100644
index 0000000000..3f3946e282
--- /dev/null
+++ b/framework/src/Volo.Abp.EventBus.Abstractions/FodyWeavers.xsd
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.
+
+
+
+
+ A comma-separated list of error codes that can be safely ignored in assembly verification.
+
+
+
+
+ 'false' to turn off automatic generation of the XML Schema file.
+
+
+
+
+
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.EventBus.Abstractions/Volo.Abp.EventBus.Abstractions.csproj b/framework/src/Volo.Abp.EventBus.Abstractions/Volo.Abp.EventBus.Abstractions.csproj
new file mode 100644
index 0000000000..ae0cef7f59
--- /dev/null
+++ b/framework/src/Volo.Abp.EventBus.Abstractions/Volo.Abp.EventBus.Abstractions.csproj
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+ netstandard2.0
+
+
+
+
+
+
+
+
diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/EtoBase.cs b/framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/Domain/Entities/Events/Distributed/EtoBase.cs
similarity index 100%
rename from framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/EtoBase.cs
rename to framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/Domain/Entities/Events/Distributed/EtoBase.cs
diff --git a/framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/Abstractions/AbpEventBusAbstractionsModule.cs b/framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/Abstractions/AbpEventBusAbstractionsModule.cs
new file mode 100644
index 0000000000..bb9d4585b9
--- /dev/null
+++ b/framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/Abstractions/AbpEventBusAbstractionsModule.cs
@@ -0,0 +1,9 @@
+using Volo.Abp.Modularity;
+
+namespace Volo.Abp.EventBus.Abstractions
+{
+ public class AbpEventBusAbstractionsModule : AbpModule
+ {
+
+ }
+}
diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/EventNameAttribute.cs b/framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/EventNameAttribute.cs
similarity index 100%
rename from framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/EventNameAttribute.cs
rename to framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/EventNameAttribute.cs
diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/GenericEventNameAttribute.cs b/framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/GenericEventNameAttribute.cs
similarity index 100%
rename from framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/GenericEventNameAttribute.cs
rename to framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/GenericEventNameAttribute.cs
diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/IEventNameProvider.cs b/framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/IEventNameProvider.cs
similarity index 100%
rename from framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/IEventNameProvider.cs
rename to framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/IEventNameProvider.cs
diff --git a/framework/src/Volo.Abp.EventBus/Volo.Abp.EventBus.csproj b/framework/src/Volo.Abp.EventBus/Volo.Abp.EventBus.csproj
index a1799c6673..221454bed3 100644
--- a/framework/src/Volo.Abp.EventBus/Volo.Abp.EventBus.csproj
+++ b/framework/src/Volo.Abp.EventBus/Volo.Abp.EventBus.csproj
@@ -15,7 +15,7 @@
-
+
diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/AbpEventBusModule.cs b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/AbpEventBusModule.cs
index 81c3393a50..eb9c17b129 100644
--- a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/AbpEventBusModule.cs
+++ b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/AbpEventBusModule.cs
@@ -1,6 +1,7 @@
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
+using Volo.Abp.EventBus.Abstractions;
using Volo.Abp.EventBus.Distributed;
using Volo.Abp.EventBus.Local;
using Volo.Abp.Modularity;
@@ -9,7 +10,9 @@ using Volo.Abp.Reflection;
namespace Volo.Abp.EventBus
{
- [DependsOn(typeof(AbpMultiTenancyModule))]
+ [DependsOn(
+ typeof(AbpEventBusAbstractionsModule),
+ typeof(AbpMultiTenancyModule))]
public class AbpEventBusModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
diff --git a/framework/src/Volo.Abp.MultiTenancy/Volo.Abp.MultiTenancy.csproj b/framework/src/Volo.Abp.MultiTenancy/Volo.Abp.MultiTenancy.csproj
index 951712c7f0..344dbfdec0 100644
--- a/framework/src/Volo.Abp.MultiTenancy/Volo.Abp.MultiTenancy.csproj
+++ b/framework/src/Volo.Abp.MultiTenancy/Volo.Abp.MultiTenancy.csproj
@@ -16,6 +16,7 @@
+
diff --git a/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/AbpMultiTenancyModule.cs b/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/AbpMultiTenancyModule.cs
index 9dc64ef7f8..c51daf99aa 100644
--- a/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/AbpMultiTenancyModule.cs
+++ b/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/AbpMultiTenancyModule.cs
@@ -1,5 +1,6 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Data;
+using Volo.Abp.EventBus.Abstractions;
using Volo.Abp.Modularity;
using Volo.Abp.MultiTenancy.ConfigurationStore;
using Volo.Abp.Security;
@@ -10,7 +11,8 @@ namespace Volo.Abp.MultiTenancy
[DependsOn(
typeof(AbpDataModule),
- typeof(AbpSecurityModule)
+ typeof(AbpSecurityModule),
+ typeof(AbpEventBusAbstractionsModule)
)]
public class AbpMultiTenancyModule : AbpModule
{
diff --git a/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/TenantConnectionStringUpdatedEto.cs b/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/TenantConnectionStringUpdatedEto.cs
new file mode 100644
index 0000000000..022343821b
--- /dev/null
+++ b/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/TenantConnectionStringUpdatedEto.cs
@@ -0,0 +1,21 @@
+using System;
+using Volo.Abp.Domain.Entities.Events.Distributed;
+using Volo.Abp.EventBus;
+
+namespace Volo.Abp.MultiTenancy
+{
+ [Serializable]
+ [EventName("abp.multi_tenancy.tenant.connection_string.updated")]
+ public class TenantConnectionStringUpdatedEto : EtoBase
+ {
+ public Guid Id { get; set; }
+
+ public string Name { get; set; }
+
+ public string ConnectionStringName { get; set; }
+
+ public string OldValue { get; set; }
+
+ public string NewValue { get; set; }
+ }
+}
diff --git a/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/TenantCreatedEto.cs b/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/TenantCreatedEto.cs
new file mode 100644
index 0000000000..317995c971
--- /dev/null
+++ b/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/TenantCreatedEto.cs
@@ -0,0 +1,15 @@
+using System;
+using Volo.Abp.Domain.Entities.Events.Distributed;
+using Volo.Abp.EventBus;
+
+namespace Volo.Abp.MultiTenancy
+{
+ [Serializable]
+ [EventName("abp.multi_tenancy.tenant.created")]
+ public class TenantCreatedEto : EtoBase
+ {
+ public Guid Id { get; set; }
+
+ public string Name { get; set; }
+ }
+}
diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/AbpIdentityDomainModule.cs b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/AbpIdentityDomainModule.cs
index 4269ae2e01..4326d1aeb8 100644
--- a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/AbpIdentityDomainModule.cs
+++ b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/AbpIdentityDomainModule.cs
@@ -1,4 +1,5 @@
-using Microsoft.AspNetCore.Identity;
+using System.Collections.Generic;
+using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Options;
diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityDataSeeder.cs b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityDataSeeder.cs
index f6bed1b914..9051dc7d66 100644
--- a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityDataSeeder.cs
+++ b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityDataSeeder.cs
@@ -49,58 +49,61 @@ namespace Volo.Abp.Identity
Check.NotNullOrWhiteSpace(adminEmail, nameof(adminEmail));
Check.NotNullOrWhiteSpace(adminPassword, nameof(adminPassword));
- await IdentityOptions.SetAsync();
-
- var result = new IdentityDataSeedResult();
-
using (CurrentTenant.Change(tenantId))
{
- //"admin" user
- const string adminUserName = "admin";
- var adminUser = await UserRepository.FindByNormalizedUserNameAsync(
- LookupNormalizer.NormalizeName(adminUserName)
- );
+ await IdentityOptions.SetAsync();
- if (adminUser != null)
+ using (IdentityOptions.Value.Password.ClearRequirements())
{
- return result;
- }
+ var result = new IdentityDataSeedResult();
+ //"admin" user
+ const string adminUserName = "admin";
+ var adminUser = await UserRepository.FindByNormalizedUserNameAsync(
+ LookupNormalizer.NormalizeName(adminUserName)
+ );
- adminUser = new IdentityUser(
- GuidGenerator.Create(),
- adminUserName,
- adminEmail,
- tenantId
- )
- {
- Name = adminUserName
- };
-
- (await UserManager.CreateAsync(adminUser, adminPassword)).CheckErrors();
- result.CreatedAdminUser = true;
+ if (adminUser != null)
+ {
+ return result;
+ }
- //"admin" role
- const string adminRoleName = "admin";
- var adminRole = await RoleRepository.FindByNormalizedNameAsync(LookupNormalizer.NormalizeName(adminRoleName));
- if (adminRole == null)
- {
- adminRole = new IdentityRole(
+ adminUser = new IdentityUser(
GuidGenerator.Create(),
- adminRoleName,
+ adminUserName,
+ adminEmail,
tenantId
)
{
- IsStatic = true,
- IsPublic = true
+ Name = adminUserName
};
- (await RoleManager.CreateAsync(adminRole)).CheckErrors();
- result.CreatedAdminRole = true;
- }
+ (await UserManager.CreateAsync(adminUser, adminPassword)).CheckErrors();
+ result.CreatedAdminUser = true;
+
+ //"admin" role
+ const string adminRoleName = "admin";
+ var adminRole =
+ await RoleRepository.FindByNormalizedNameAsync(LookupNormalizer.NormalizeName(adminRoleName));
+ if (adminRole == null)
+ {
+ adminRole = new IdentityRole(
+ GuidGenerator.Create(),
+ adminRoleName,
+ tenantId
+ )
+ {
+ IsStatic = true,
+ IsPublic = true
+ };
- (await UserManager.AddToRoleAsync(adminUser, adminRoleName)).CheckErrors();
+ (await RoleManager.CreateAsync(adminRole)).CheckErrors();
+ result.CreatedAdminRole = true;
+ }
- return result;
+ (await UserManager.AddToRoleAsync(adminUser, adminRoleName)).CheckErrors();
+
+ return result;
+ }
}
}
}
diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/PasswordOptionsExtensions.cs b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/PasswordOptionsExtensions.cs
new file mode 100644
index 0000000000..793cc6349e
--- /dev/null
+++ b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/PasswordOptionsExtensions.cs
@@ -0,0 +1,35 @@
+using System;
+using Microsoft.AspNetCore.Identity;
+
+namespace Volo.Abp.Identity
+{
+ public static class PasswordOptionsExtensions
+ {
+ public static IDisposable ClearRequirements(this PasswordOptions options)
+ {
+ var oldRequireDigit = options.RequireDigit;
+ var oldRequiredLength = options.RequiredLength;
+ var oldRequireLowercase = options.RequireLowercase;
+ var oldRequireUppercase = options.RequireUppercase;
+ var oldRequiredUniqueChars = options.RequiredUniqueChars;
+ var oldRequireNonAlphanumeric = options.RequireNonAlphanumeric;
+
+ options.RequireDigit = false;
+ options.RequiredLength = 1;
+ options.RequireLowercase = false;
+ options.RequireUppercase = false;
+ options.RequiredUniqueChars = 1;
+ options.RequireNonAlphanumeric = false;
+
+ return new DisposeAction(() =>
+ {
+ options.RequireDigit = oldRequireDigit;
+ options.RequiredLength = oldRequiredLength;
+ options.RequireLowercase = oldRequireLowercase;
+ options.RequireUppercase = oldRequireUppercase;
+ options.RequiredUniqueChars = oldRequiredUniqueChars;
+ options.RequireNonAlphanumeric = oldRequireNonAlphanumeric;
+ });
+ }
+ }
+}
diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/AbpPermissionManagementDomainModule.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/AbpPermissionManagementDomainModule.cs
index c199a2130b..f437802c6b 100644
--- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/AbpPermissionManagementDomainModule.cs
+++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/AbpPermissionManagementDomainModule.cs
@@ -1,4 +1,7 @@
-using Volo.Abp.Authorization;
+using System.Collections.Generic;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Options;
+using Volo.Abp.Authorization;
using Volo.Abp.Caching;
using Volo.Abp.Domain;
using Volo.Abp.Json;
@@ -13,6 +16,6 @@ namespace Volo.Abp.PermissionManagement
[DependsOn(typeof(AbpJsonModule))]
public class AbpPermissionManagementDomainModule : AbpModule
{
-
+
}
}
diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionDataSeedContributor.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionDataSeedContributor.cs
index ac8274d445..8260df895f 100644
--- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionDataSeedContributor.cs
+++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionDataSeedContributor.cs
@@ -10,7 +10,6 @@ namespace Volo.Abp.PermissionManagement
public class PermissionDataSeedContributor : IDataSeedContributor, ITransientDependency
{
protected ICurrentTenant CurrentTenant { get; }
-
protected IPermissionDefinitionManager PermissionDefinitionManager { get; }
protected IPermissionDataSeeder PermissionDataSeeder { get; }
diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionManagementOptions.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionManagementOptions.cs
index 674f5daa88..2e29ab9c29 100644
--- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionManagementOptions.cs
+++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionManagementOptions.cs
@@ -5,7 +5,6 @@ namespace Volo.Abp.PermissionManagement
{
public class PermissionManagementOptions
{
- //TODO: rename to Providers
public ITypeList ManagementProviders { get; }
public Dictionary ProviderPolicies { get; }
diff --git a/nupkg/common.ps1 b/nupkg/common.ps1
index 29249ef3f4..16f13513ee 100644
--- a/nupkg/common.ps1
+++ b/nupkg/common.ps1
@@ -91,6 +91,7 @@ $projects = (
"framework/src/Volo.Abp.EntityFrameworkCore.PostgreSql",
"framework/src/Volo.Abp.EntityFrameworkCore.Sqlite",
"framework/src/Volo.Abp.EntityFrameworkCore.SqlServer",
+ "framework/src/Volo.Abp.EventBus.Abstractions",
"framework/src/Volo.Abp.EventBus",
"framework/src/Volo.Abp.EventBus.RabbitMQ",
"framework/src/Volo.Abp.EventBus.Kafka",