From 00b6ceaecda9157b7762450890a1236346b5d909 Mon Sep 17 00:00:00 2001 From: maliming Date: Sun, 14 Feb 2021 20:09:44 +0800 Subject: [PATCH 01/23] Make Volo.Abp.EntityFrameworkCore.Oracle available. --- ...Volo.Abp.EntityFrameworkCore.Oracle.csproj | 2 +- ...extConfigurationContextOracleExtensions.cs | 59 ++++++++++-------- .../AbpDbContextOptionsOracleExtensions.cs | 60 +++++++++---------- .../AbpEntityFrameworkCoreOracleModule.cs | 42 +++++++------ nupkg/common.ps1 | 2 +- 5 files changed, 85 insertions(+), 80 deletions(-) diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo.Abp.EntityFrameworkCore.Oracle.csproj b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo.Abp.EntityFrameworkCore.Oracle.csproj index 7611559008..2cfa2fb199 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo.Abp.EntityFrameworkCore.Oracle.csproj +++ b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo.Abp.EntityFrameworkCore.Oracle.csproj @@ -19,7 +19,7 @@ - + diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextOracleExtensions.cs b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextOracleExtensions.cs index 2dd3139a82..31bde60b38 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextOracleExtensions.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextOracleExtensions.cs @@ -1,26 +1,33 @@ -// using JetBrains.Annotations; -// using Microsoft.EntityFrameworkCore; -// using System; -// using Oracle.EntityFrameworkCore.Infrastructure; -// using Volo.Abp.EntityFrameworkCore.DependencyInjection; -// -// namespace Volo.Abp.EntityFrameworkCore -// { -// public static class AbpDbContextConfigurationContextOracleExtensions -// { -// public static DbContextOptionsBuilder UseOracle( -// [NotNull] this AbpDbContextConfigurationContext context, -// [CanBeNull] Action oracleOptionsAction = null) -// { -// TODO: UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery); -// if (context.ExistingConnection != null) -// { -// return context.DbContextOptions.UseOracle(context.ExistingConnection, oracleOptionsAction); -// } -// else -// { -// return context.DbContextOptions.UseOracle(context.ConnectionString, oracleOptionsAction); -// } -// } -// } -// } +using JetBrains.Annotations; +using Microsoft.EntityFrameworkCore; +using System; +using Oracle.EntityFrameworkCore.Infrastructure; +using Volo.Abp.EntityFrameworkCore.DependencyInjection; + +namespace Volo.Abp.EntityFrameworkCore +{ + public static class AbpDbContextConfigurationContextOracleExtensions + { + public static DbContextOptionsBuilder UseOracle( + [NotNull] this AbpDbContextConfigurationContext context, + [CanBeNull] Action oracleOptionsAction = null) + { + if (context.ExistingConnection != null) + { + return context.DbContextOptions.UseOracle(context.ExistingConnection, optionsBuilder => + { + optionsBuilder.UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery); + oracleOptionsAction?.Invoke(optionsBuilder); + }); + } + else + { + return context.DbContextOptions.UseOracle(context.ConnectionString, optionsBuilder => + { + optionsBuilder.UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery); + oracleOptionsAction?.Invoke(optionsBuilder); + }); + } + } + } +} diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/AbpDbContextOptionsOracleExtensions.cs b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/AbpDbContextOptionsOracleExtensions.cs index f5f9dc7f61..f4817d5ab4 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/AbpDbContextOptionsOracleExtensions.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/AbpDbContextOptionsOracleExtensions.cs @@ -1,30 +1,30 @@ -// using JetBrains.Annotations; -// using System; -// using Oracle.EntityFrameworkCore.Infrastructure; -// -// namespace Volo.Abp.EntityFrameworkCore -// { -// public static class AbpDbContextOptionsOracleExtensions -// { -// public static void UseOracle( -// [NotNull] this AbpDbContextOptions options, -// [CanBeNull] Action oracleOptionsAction = null) -// { -// options.Configure(context => -// { -// context.UseOracle(oracleOptionsAction); -// }); -// } -// -// public static void UseOracle( -// [NotNull] this AbpDbContextOptions options, -// [CanBeNull] Action oracleOptionsAction = null) -// where TDbContext : AbpDbContext -// { -// options.Configure(context => -// { -// context.UseOracle(oracleOptionsAction); -// }); -// } -// } -// } +using JetBrains.Annotations; +using System; +using Oracle.EntityFrameworkCore.Infrastructure; + +namespace Volo.Abp.EntityFrameworkCore +{ + public static class AbpDbContextOptionsOracleExtensions + { + public static void UseOracle( + [NotNull] this AbpDbContextOptions options, + [CanBeNull] Action oracleOptionsAction = null) + { + options.Configure(context => + { + context.UseOracle(oracleOptionsAction); + }); + } + + public static void UseOracle( + [NotNull] this AbpDbContextOptions options, + [CanBeNull] Action oracleOptionsAction = null) + where TDbContext : AbpDbContext + { + options.Configure(context => + { + context.UseOracle(oracleOptionsAction); + }); + } + } +} diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/Oracle/AbpEntityFrameworkCoreOracleModule.cs b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/Oracle/AbpEntityFrameworkCoreOracleModule.cs index 21fad9375a..b7cbaec1a1 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/Oracle/AbpEntityFrameworkCoreOracleModule.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/Oracle/AbpEntityFrameworkCoreOracleModule.cs @@ -1,22 +1,20 @@ -// using Volo.Abp.Guids; -// using Volo.Abp.Modularity; -// -// namespace Volo.Abp.EntityFrameworkCore.Oracle -// { -// [DependsOn( -// typeof(AbpEntityFrameworkCoreModule) -// )] -// public class AbpEntityFrameworkCoreOracleModule : AbpModule -// { -// public override void ConfigureServices(ServiceConfigurationContext context) -// { -// Configure(options => -// { -// if (options.DefaultSequentialGuidType == null) -// { -// options.DefaultSequentialGuidType = SequentialGuidType.SequentialAsBinary; -// } -// }); -// } -// } -// } +using Volo.Abp.Guids; +using Volo.Abp.Modularity; + +namespace Volo.Abp.EntityFrameworkCore.Oracle +{ + [DependsOn(typeof(AbpEntityFrameworkCoreModule))] + public class AbpEntityFrameworkCoreOracleModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + if (options.DefaultSequentialGuidType == null) + { + options.DefaultSequentialGuidType = SequentialGuidType.SequentialAsBinary; + } + }); + } + } +} diff --git a/nupkg/common.ps1 b/nupkg/common.ps1 index 16f13513ee..8fcb74149a 100644 --- a/nupkg/common.ps1 +++ b/nupkg/common.ps1 @@ -86,7 +86,7 @@ $projects = ( "framework/src/Volo.Abp.Emailing", "framework/src/Volo.Abp.EntityFrameworkCore", "framework/src/Volo.Abp.EntityFrameworkCore.MySQL", - # "framework/src/Volo.Abp.EntityFrameworkCore.Oracle", + "framework/src/Volo.Abp.EntityFrameworkCore.Oracle", "framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart", "framework/src/Volo.Abp.EntityFrameworkCore.PostgreSql", "framework/src/Volo.Abp.EntityFrameworkCore.Sqlite", From f7cc1138e15d7462a8416cfd1abf827f33437a57 Mon Sep 17 00:00:00 2001 From: maliming Date: Sun, 14 Feb 2021 20:43:15 +0800 Subject: [PATCH 02/23] Upgrade NUglify to latest. Related: 7667 --- .../Volo.Abp.AspNetCore.Mvc.UI.csproj | 2 +- framework/src/Volo.Abp.Minify/Volo.Abp.Minify.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo.Abp.AspNetCore.Mvc.UI.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo.Abp.AspNetCore.Mvc.UI.csproj index ad0066db55..a379c8057d 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo.Abp.AspNetCore.Mvc.UI.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo.Abp.AspNetCore.Mvc.UI.csproj @@ -15,7 +15,7 @@ - + diff --git a/framework/src/Volo.Abp.Minify/Volo.Abp.Minify.csproj b/framework/src/Volo.Abp.Minify/Volo.Abp.Minify.csproj index 6f25c447f0..45302cfab3 100644 --- a/framework/src/Volo.Abp.Minify/Volo.Abp.Minify.csproj +++ b/framework/src/Volo.Abp.Minify/Volo.Abp.Minify.csproj @@ -19,7 +19,7 @@ - + From bf920da8cebe11e444ea162515d8b88f2ca208c2 Mon Sep 17 00:00:00 2001 From: maliming Date: Mon, 15 Feb 2021 09:51:29 +0800 Subject: [PATCH 03/23] Explicitly set email & password in the initial data seed of startup templates. --- .../Volo/Abp/Identity/IdentityDataSeedContributor.cs | 9 +++++++-- .../Data/MyProjectNameDbMigrationService.cs | 6 ++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityDataSeedContributor.cs b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityDataSeedContributor.cs index a5af0acf2c..82677d74e4 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityDataSeedContributor.cs +++ b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityDataSeedContributor.cs @@ -6,6 +6,11 @@ namespace Volo.Abp.Identity { public class IdentityDataSeedContributor : IDataSeedContributor, ITransientDependency { + public const string AdminEmailPropertyName = "AdminEmail"; + public const string AdminEmailDefaultValue = "admin@abp.io"; + public const string AdminPasswordPropertyName = "AdminPassword"; + public const string AdminPasswordDefaultValue = "1q2w3E*"; + protected IIdentityDataSeeder IdentityDataSeeder { get; } public IdentityDataSeedContributor(IIdentityDataSeeder identityDataSeeder) @@ -16,8 +21,8 @@ namespace Volo.Abp.Identity public virtual Task SeedAsync(DataSeedContext context) { return IdentityDataSeeder.SeedAsync( - context?["AdminEmail"] as string ?? "admin@abp.io", - context?["AdminPassword"] as string ?? "1q2w3E*", + context?[AdminEmailPropertyName] as string ?? AdminEmailDefaultValue, + context?[AdminPasswordPropertyName] as string ?? AdminPasswordDefaultValue, context?.TenantId ); } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/Data/MyProjectNameDbMigrationService.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/Data/MyProjectNameDbMigrationService.cs index f33076746a..4327e32b00 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/Data/MyProjectNameDbMigrationService.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/Data/MyProjectNameDbMigrationService.cs @@ -9,6 +9,7 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; using Volo.Abp.Data; using Volo.Abp.DependencyInjection; +using Volo.Abp.Identity; using Volo.Abp.MultiTenancy; using Volo.Abp.TenantManagement; @@ -106,6 +107,11 @@ namespace MyCompanyName.MyProjectName.Data Logger.LogInformation($"Executing {(tenant == null ? "host" : tenant.Name + " tenant")} database seed..."); await _dataSeeder.SeedAsync(tenant?.Id); + + await _dataSeeder.SeedAsync(new DataSeedContext(tenant?.Id) + .WithProperty(IdentityDataSeedContributor.AdminEmailPropertyName, IdentityDataSeedContributor.AdminEmailDefaultValue) + .WithProperty(IdentityDataSeedContributor.AdminPasswordPropertyName, IdentityDataSeedContributor.AdminPasswordDefaultValue) + ); } private bool DbMigrationsProjectExists() From 1a884c72de0cda86db95c6902033a8d9a00ec1cc Mon Sep 17 00:00:00 2001 From: maliming Date: Mon, 15 Feb 2021 09:59:29 +0800 Subject: [PATCH 04/23] Update MyProjectNameDbMigrationService.cs --- .../Data/MyProjectNameDbMigrationService.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/Data/MyProjectNameDbMigrationService.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/Data/MyProjectNameDbMigrationService.cs index 4327e32b00..08d784f58d 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/Data/MyProjectNameDbMigrationService.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/Data/MyProjectNameDbMigrationService.cs @@ -106,8 +106,6 @@ namespace MyCompanyName.MyProjectName.Data { Logger.LogInformation($"Executing {(tenant == null ? "host" : tenant.Name + " tenant")} database seed..."); - await _dataSeeder.SeedAsync(tenant?.Id); - await _dataSeeder.SeedAsync(new DataSeedContext(tenant?.Id) .WithProperty(IdentityDataSeedContributor.AdminEmailPropertyName, IdentityDataSeedContributor.AdminEmailDefaultValue) .WithProperty(IdentityDataSeedContributor.AdminPasswordPropertyName, IdentityDataSeedContributor.AdminPasswordDefaultValue) From efb37d57458223ed7830bf02341549c39202dc50 Mon Sep 17 00:00:00 2001 From: maliming Date: Mon, 15 Feb 2021 16:22:39 +0800 Subject: [PATCH 05/23] Rename EmailSettingManagement to EmailSetting. --- .../SettingManagementPermissionDefinitionProvider.cs | 2 +- .../Abp/SettingManagement/SettingManagementPermissions.cs | 2 +- .../Volo/Abp/SettingManagement/EmailSettingsAppService.cs | 2 +- .../AbpSettingManagementBlazorModule.cs | 2 +- ...tPageContributor.cs => EmailSettingPageContributor.cs} | 6 +++--- .../Resources/AbpSettingManagement/de-DE.json | 4 ++-- .../Localization/Resources/AbpSettingManagement/en.json | 4 ++-- .../Localization/Resources/AbpSettingManagement/es.json | 4 ++-- .../Localization/Resources/AbpSettingManagement/tr.json | 4 ++-- .../Resources/AbpSettingManagement/zh-Hans.json | 4 ++-- .../AbpSettingManagementWebModule.cs | 2 +- ...tPageContributor.cs => EmailSettingPageContributor.cs} | 8 ++++---- 12 files changed, 22 insertions(+), 22 deletions(-) rename modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Settings/{EmailSettingManagementPageContributor.cs => EmailSettingPageContributor.cs} (87%) rename modules/setting-management/src/Volo.Abp.SettingManagement.Web/Settings/{EmailSettingManagementPageContributor.cs => EmailSettingPageContributor.cs} (85%) diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Application.Contracts/Volo/Abp/SettingManagement/SettingManagementPermissionDefinitionProvider.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Application.Contracts/Volo/Abp/SettingManagement/SettingManagementPermissionDefinitionProvider.cs index 6c93975aa8..a7c7c7f983 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Application.Contracts/Volo/Abp/SettingManagement/SettingManagementPermissionDefinitionProvider.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Application.Contracts/Volo/Abp/SettingManagement/SettingManagementPermissionDefinitionProvider.cs @@ -10,7 +10,7 @@ namespace Volo.Abp.SettingManagement public override void Define(IPermissionDefinitionContext context) { var moduleGroup = context.AddGroup(SettingManagementPermissions.GroupName, L("Permission:SettingManagement")); - moduleGroup.AddPermission(SettingManagementPermissions.EmailSettingManagement, L("Permission:EmailSettingManagement"), multiTenancySide: MultiTenancySides.Host); + moduleGroup.AddPermission(SettingManagementPermissions.EmailSetting, L("Permission:EmailSetting"), multiTenancySide: MultiTenancySides.Host); } private static LocalizableString L(string name) diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Application.Contracts/Volo/Abp/SettingManagement/SettingManagementPermissions.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Application.Contracts/Volo/Abp/SettingManagement/SettingManagementPermissions.cs index 62d4448549..eb68845487 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Application.Contracts/Volo/Abp/SettingManagement/SettingManagementPermissions.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Application.Contracts/Volo/Abp/SettingManagement/SettingManagementPermissions.cs @@ -6,7 +6,7 @@ namespace Volo.Abp.SettingManagement { public const string GroupName = "SettingManagement"; - public const string EmailSettingManagement = GroupName + ".EmailSettingManagement"; + public const string EmailSetting = GroupName + ".EmailSetting"; public static string[] GetAll() { diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Application/Volo/Abp/SettingManagement/EmailSettingsAppService.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Application/Volo/Abp/SettingManagement/EmailSettingsAppService.cs index c1eb5fc304..ee5e4ec430 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Application/Volo/Abp/SettingManagement/EmailSettingsAppService.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Application/Volo/Abp/SettingManagement/EmailSettingsAppService.cs @@ -5,7 +5,7 @@ using Volo.Abp.Emailing; namespace Volo.Abp.SettingManagement { - [Authorize(SettingManagementPermissions.EmailSettingManagement)] + [Authorize(SettingManagementPermissions.EmailSetting)] public class EmailSettingsAppService : SettingManagementAppServiceBase, IEmailSettingsAppService { protected ISettingManager SettingManager { get; } diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/AbpSettingManagementBlazorModule.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/AbpSettingManagementBlazorModule.cs index 14bd1bdd55..de17beec9e 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/AbpSettingManagementBlazorModule.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/AbpSettingManagementBlazorModule.cs @@ -36,7 +36,7 @@ namespace Volo.Abp.SettingManagement.Blazor Configure(options => { - options.Contributors.Add(new EmailSettingManagementPageContributor()); + options.Contributors.Add(new EmailSettingPageContributor()); }); } } diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Settings/EmailSettingManagementPageContributor.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Settings/EmailSettingPageContributor.cs similarity index 87% rename from modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Settings/EmailSettingManagementPageContributor.cs rename to modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Settings/EmailSettingPageContributor.cs index 8266618cef..b1f6e9d63a 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Settings/EmailSettingManagementPageContributor.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Settings/EmailSettingPageContributor.cs @@ -7,7 +7,7 @@ using Volo.Abp.SettingManagement.Localization; namespace Volo.Abp.SettingManagement.Blazor.Settings { - public class EmailSettingManagementPageContributor: ISettingComponentContributor + public class EmailSettingPageContributor: ISettingComponentContributor { public async Task ConfigureAsync(SettingComponentCreationContext context) { @@ -20,7 +20,7 @@ namespace Volo.Abp.SettingManagement.Blazor.Settings context.Groups.Add( new SettingComponentGroup( "Volo.Abp.SettingManagement", - l["Menu:EmailSettingManagement"], + l["Menu:EmailSetting"], typeof(EmailSettingGroupViewComponent) ) ); @@ -35,7 +35,7 @@ namespace Volo.Abp.SettingManagement.Blazor.Settings { var authorizationService = context.ServiceProvider.GetRequiredService(); - return await authorizationService.IsGrantedAsync(SettingManagementPermissions.EmailSettingManagement); + return await authorizationService.IsGrantedAsync(SettingManagementPermissions.EmailSetting); } } } diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/de-DE.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/de-DE.json index 78300d8530..ef0af78334 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/de-DE.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/de-DE.json @@ -4,8 +4,8 @@ "Settings": "Einstellungen", "SuccessfullySaved": "Erfolgreich gespeichert", "Permission:SettingManagement": "Einstellungen-Verwaltung", - "Permission:EmailSettingManagement": "E-Mail-Einstellungen", - "Menu:EmailSettingManagement": "E-Mail-Verwaltung", + "Permission:EmailSetting": "E-Mail-Einstellungen", + "Menu:EmailSetting": "E-Mail-Einstellung", "SmtpHost": "Host", "SmtpPort": "Port", "SmtpUserName": "Benutzername", diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/en.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/en.json index 5cbee9f36c..37ce73fcb2 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/en.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/en.json @@ -4,8 +4,8 @@ "Settings": "Settings", "SuccessfullySaved": "Successfully saved", "Permission:SettingManagement": "Setting Management", - "Permission:EmailSettingManagement": "Email Settings", - "Menu:EmailSettingManagement": "Email management", + "Permission:EmailSetting": "Email Setting", + "Menu:EmailSetting": "Email Setting", "SmtpHost": "Host", "SmtpPort": "Port", "SmtpUserName": "User name", diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/es.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/es.json index d2f833a686..7bd35306bb 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/es.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/es.json @@ -4,8 +4,8 @@ "Settings": "Configuraciones", "SuccessfullySaved": "Guardado correctamente", "Permission:SettingManagement": "Configuraciones de correo electronico", - "Permission:EmailSettingManagement": "Administración Configuraciones", - "Menu:EmailSettingManagement": "Administración de correo electronico", + "Permission:EmailSetting": "Configuración de correo electrónico", + "Menu:EmailSetting": "Configuración de correo electrónico", "SmtpHost": "Host", "SmtpPort": "Puerto", "SmtpUserName": "Nombre de usuario", diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/tr.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/tr.json index de00a854c0..4710abde96 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/tr.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/tr.json @@ -4,8 +4,8 @@ "Settings": "Ayarlar", "SuccessfullySaved": "Başarıyla Kaydedildi", "Permission:SettingManagement": "Ayarlar yönetimi", - "Permission:EmailSettingManagement": "Email Ayarlar", - "Menu:EmailSettingManagement": "Email yönetimi", + "Permission:EmailSetting": "Email Ayarlar", + "Menu:EmailSetting": "Email Ayarlar", "SmtpHost": "Sunucu", "SmtpPort": "Port", "SmtpUserName": "Kullanıcı adı", diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/zh-Hans.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/zh-Hans.json index 653ff051ee..5a2053700a 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/zh-Hans.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/zh-Hans.json @@ -4,8 +4,8 @@ "Settings": "设置", "SuccessfullySaved": "保存成功", "Permission:SettingManagement": "设置管理", - "Permission:EmailSettingManagement": "邮件设置", - "Menu:EmailSettingManagement": "邮件管理", + "Permission:EmailSetting": "邮件设置", + "Menu:EmailSetting": "邮件设置", "SmtpHost": "主机", "SmtpPort": "端口", "SmtpUserName": "用户名", diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/AbpSettingManagementWebModule.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/AbpSettingManagementWebModule.cs index 139b654030..84113041b8 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/AbpSettingManagementWebModule.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/AbpSettingManagementWebModule.cs @@ -34,7 +34,7 @@ namespace Volo.Abp.SettingManagement.Web Configure(options => { - options.Contributors.Add(new EmailSettingManagementPageContributor()); + options.Contributors.Add(new EmailSettingPageContributor()); }); Configure(options => diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Settings/EmailSettingManagementPageContributor.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Settings/EmailSettingPageContributor.cs similarity index 85% rename from modules/setting-management/src/Volo.Abp.SettingManagement.Web/Settings/EmailSettingManagementPageContributor.cs rename to modules/setting-management/src/Volo.Abp.SettingManagement.Web/Settings/EmailSettingPageContributor.cs index 8df3a2c76f..b7888a8eb2 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Settings/EmailSettingManagementPageContributor.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Settings/EmailSettingPageContributor.cs @@ -8,7 +8,7 @@ using Volo.Abp.SettingManagement.Web.Pages.SettingManagement.Components.EmailSet namespace Volo.Abp.SettingManagement.Web.Settings { - public class EmailSettingManagementPageContributor: ISettingPageContributor + public class EmailSettingPageContributor: ISettingPageContributor { public async Task ConfigureAsync(SettingPageCreationContext context) { @@ -20,8 +20,8 @@ namespace Volo.Abp.SettingManagement.Web.Settings var l = context.ServiceProvider.GetRequiredService>(); context.Groups.Add( new SettingPageGroup( - "Volo.Abp.SettingManagement", - l["Menu:EmailSettingManagement"], + "Volo.Abp.EmailSetting", + l["Menu:EmailSetting"], typeof(EmailSettingGroupViewComponent) ) ); @@ -36,7 +36,7 @@ namespace Volo.Abp.SettingManagement.Web.Settings { var authorizationService = context.ServiceProvider.GetRequiredService(); - return await authorizationService.IsGrantedAsync(SettingManagementPermissions.EmailSettingManagement); + return await authorizationService.IsGrantedAsync(SettingManagementPermissions.EmailSetting); } } } From c67896d1bb6fade69ce15d895a83616690e9a49f Mon Sep 17 00:00:00 2001 From: enisn Date: Mon, 15 Feb 2021 13:21:10 +0300 Subject: [PATCH 06/23] CmsKit - Remove updating BlogId while updating blog post --- ...ateBlogPostDto.cs => CreateBlogPostDto.cs} | 2 +- .../Admin/Blogs/IBlogPostAdminAppService.cs | 3 +- .../CmsKit/Admin/Blogs/UpdateBlogPostDto.cs | 24 +++++++++++++++ .../Admin/Blogs/BlogPostAdminAppService.cs | 7 +++-- ...CmsKitAdminApplicationAutoMapperProfile.cs | 3 +- .../Admin/Blogs/BlogPostAdminController.cs | 4 +-- .../Blogs/BlogPostAdminAppService_Tests.cs | 29 +++---------------- 7 files changed, 39 insertions(+), 33 deletions(-) rename modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/{CreateUpdateBlogPostDto.cs => CreateBlogPostDto.cs} (94%) create mode 100644 modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/UpdateBlogPostDto.cs diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/CreateUpdateBlogPostDto.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/CreateBlogPostDto.cs similarity index 94% rename from modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/CreateUpdateBlogPostDto.cs rename to modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/CreateBlogPostDto.cs index 4c0532129d..a8423a7300 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/CreateUpdateBlogPostDto.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/CreateBlogPostDto.cs @@ -5,7 +5,7 @@ using Volo.CmsKit.Blogs; namespace Volo.CmsKit.Admin.Blogs { - public class CreateUpdateBlogPostDto + public class CreateBlogPostDto { [Required] public Guid BlogId { get; set; } diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/IBlogPostAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/IBlogPostAdminAppService.cs index 28d614d289..aa110fe938 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/IBlogPostAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/IBlogPostAdminAppService.cs @@ -11,7 +11,8 @@ namespace Volo.CmsKit.Admin.Blogs BlogPostDto, Guid, PagedAndSortedResultRequestDto, - CreateUpdateBlogPostDto> + CreateBlogPostDto, + UpdateBlogPostDto> { Task GetBySlugAsync(string blogSlug, string slug); diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/UpdateBlogPostDto.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/UpdateBlogPostDto.cs new file mode 100644 index 0000000000..909d8e2e9e --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/UpdateBlogPostDto.cs @@ -0,0 +1,24 @@ +using System.ComponentModel.DataAnnotations; +using Volo.Abp.Validation; +using Volo.CmsKit.Blogs; + +namespace Volo.CmsKit.Admin.Blogs +{ + public class UpdateBlogPostDto + { + [Required] + [DynamicMaxLength(typeof(BlogPostConsts), nameof(BlogPostConsts.MaxTitleLength))] + public string Title { get; set; } + + [Required] + [DynamicStringLength( + typeof(BlogPostConsts), + nameof(BlogPostConsts.MaxSlugLength), + nameof(BlogPostConsts.MinSlugLength))] + public string Slug { get; set; } + + [DynamicMaxLength(typeof(BlogPostConsts), nameof(BlogPostConsts.MaxShortDescriptionLength))] + public string ShortDescription { get; set; } + + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogPostAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogPostAdminAppService.cs index 8fa6fb9ff7..d2c1114dfb 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogPostAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogPostAdminAppService.cs @@ -23,7 +23,8 @@ namespace Volo.CmsKit.Admin.Blogs BlogPostDto, Guid, PagedAndSortedResultRequestDto, - CreateUpdateBlogPostDto> + CreateBlogPostDto, + UpdateBlogPostDto> , IBlogPostAdminAppService { protected readonly IBlogPostManager BlogPostManager; @@ -63,7 +64,7 @@ namespace Volo.CmsKit.Admin.Blogs } [Authorize(CmsKitAdminPermissions.BlogPosts.Create)] - public override async Task CreateAsync(CreateUpdateBlogPostDto input) + public override async Task CreateAsync(CreateBlogPostDto input) { _ = await UserLookupService.GetByIdAsync(CurrentUser.GetId()); @@ -80,7 +81,7 @@ namespace Volo.CmsKit.Admin.Blogs } [Authorize(CmsKitAdminPermissions.BlogPosts.Update)] - public override async Task UpdateAsync(Guid id, CreateUpdateBlogPostDto input) + public override async Task UpdateAsync(Guid id, UpdateBlogPostDto input) { var blogPost = await BlogPostRepository.GetAsync(id); diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs index 8fc2567093..4087c25ad1 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs @@ -22,7 +22,8 @@ namespace Volo.CmsKit.Admin CreateMap(MemberList.Source); CreateMap(MemberList.Destination); - CreateMap(MemberList.Source); + CreateMap(MemberList.Source); + CreateMap(MemberList.Source); CreateMap(MemberList.Destination) .ReverseMap(); diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogPostAdminController.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogPostAdminController.cs index 6c7e78de50..92d23dff4d 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogPostAdminController.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogPostAdminController.cs @@ -31,7 +31,7 @@ namespace Volo.CmsKit.Admin.Blogs [HttpPost] [Authorize(CmsKitAdminPermissions.BlogPosts.Create)] - public virtual Task CreateAsync(CreateUpdateBlogPostDto input) + public virtual Task CreateAsync(CreateBlogPostDto input) { return BlogPostAdminAppService.CreateAsync(input); } @@ -107,7 +107,7 @@ namespace Volo.CmsKit.Admin.Blogs [HttpPut] [Route("{id}")] [Authorize(CmsKitAdminPermissions.BlogPosts.Update)] - public virtual Task UpdateAsync(Guid id, CreateUpdateBlogPostDto input) + public virtual Task UpdateAsync(Guid id, UpdateBlogPostDto input) { return BlogPostAdminAppService.UpdateAsync(id, input); } diff --git a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogPostAdminAppService_Tests.cs b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogPostAdminAppService_Tests.cs index efef70cb9b..6516e3fc2c 100644 --- a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogPostAdminAppService_Tests.cs +++ b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Blogs/BlogPostAdminAppService_Tests.cs @@ -31,7 +31,7 @@ namespace Volo.CmsKit.Blogs var slug = "my-awesome-new-post"; var shortDescription = "This blog is all about awesomeness 🤗!"; - var created = await blogPostAdminAppService.CreateAsync(new CreateUpdateBlogPostDto + var created = await blogPostAdminAppService.CreateAsync(new CreateBlogPostDto { BlogId = cmsKitTestData.Blog_Id, Title = title, @@ -55,7 +55,7 @@ namespace Volo.CmsKit.Blogs var slug = "another-my-awesome-new-post"; var shortDescription = "This blog is all about awesomeness 🤗!"; - var dto = new CreateUpdateBlogPostDto + var dto = new CreateBlogPostDto { // Non-existing Id BlogId = Guid.NewGuid(), @@ -137,9 +137,8 @@ namespace Volo.CmsKit.Blogs var title = "[Solved] Another Blog Post"; var slug = "another-short-blog-post"; - await blogPostAdminAppService.UpdateAsync(cmsKitTestData.BlogPost_2_Id, new CreateUpdateBlogPostDto + await blogPostAdminAppService.UpdateAsync(cmsKitTestData.BlogPost_2_Id, new UpdateBlogPostDto { - BlogId = cmsKitTestData.Blog_Id, ShortDescription = shortDescription, Title = title, Slug = slug, @@ -152,31 +151,11 @@ namespace Volo.CmsKit.Blogs blogPost.Slug.ShouldBe(slug); } - [Fact] - public async Task UpdateAsync_ShouldThrowException_WhileChangingWithNonExistingBlogId() - { - var nonExistingId = Guid.NewGuid(); - - var dto = new CreateUpdateBlogPostDto - { - BlogId = nonExistingId, - Title = cmsKitTestData.Page_2_Title, - Slug = cmsKitTestData.BlogPost_2_Slug - }; - - var exception = await Should.ThrowAsync(async () => - await blogPostAdminAppService.UpdateAsync(cmsKitTestData.BlogPost_2_Id, dto)); - - exception.EntityType.ShouldBe(typeof(Blog)); - exception.Id.ShouldBe(nonExistingId); - } - [Fact] public async Task UpdateAsync_ShouldThrowException_WhileUpdatingWithAlreadyExistingSlug() { - var dto = new CreateUpdateBlogPostDto + var dto = new UpdateBlogPostDto { - BlogId = cmsKitTestData.Blog_Id, Title = "Some new title", Slug = cmsKitTestData.BlogPost_1_Slug }; From 82cbfc180c0492552a9bca7379c244d51924aa66 Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 16 Feb 2021 10:18:12 +0800 Subject: [PATCH 07/23] Use abp-id-name in FeatureManagementModal.cshtml Resolve #7722 --- .../FeatureManagement/FeatureManagementModal.cshtml | 9 ++++----- .../FeatureManagement/FeatureManagementModal.cshtml.cs | 7 ------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml index f3080b7275..272d6eb8e0 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml @@ -44,14 +44,13 @@ var disabled = Model.IsDisabled(feature.Provider.Name);
- - + @if (feature.ValueType is ToggleStringValueType) { } - +
} diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml.cs index d2ccc5a44d..9598c9a46a 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml.cs @@ -75,13 +75,6 @@ namespace Volo.Abp.FeatureManagement.Web.Pages.FeatureManagement return providerName != ProviderName && providerName != DefaultValueFeatureValueProvider.ProviderName; } - public class ProviderInfoViewModel - { - public string ProviderName { get; set; } - - public string ProviderKey { get; set; } - } - public class FeatureGroupViewModel { public List Features { get; set; } From f88b495e54872f87be223f046f0b7326c510bc30 Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 16 Feb 2021 10:46:13 +0800 Subject: [PATCH 08/23] Upgrade Swashbuckle.AspNetCore to 6.0. --- framework/src/Volo.Abp.Swashbuckle/Volo.Abp.Swashbuckle.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/src/Volo.Abp.Swashbuckle/Volo.Abp.Swashbuckle.csproj b/framework/src/Volo.Abp.Swashbuckle/Volo.Abp.Swashbuckle.csproj index 9a720524d9..d2d0f0f13a 100644 --- a/framework/src/Volo.Abp.Swashbuckle/Volo.Abp.Swashbuckle.csproj +++ b/framework/src/Volo.Abp.Swashbuckle/Volo.Abp.Swashbuckle.csproj @@ -15,7 +15,7 @@ - + From d4203636f09a47b7505d22a75808ada22f5ad203 Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 16 Feb 2021 10:51:54 +0800 Subject: [PATCH 09/23] Select scope by default. --- .../MyProjectNameHttpApiHostModule.cs | 1 + .../MyCompanyName.MyProjectName.HttpApi.HostWithIds.csproj | 1 - .../MyProjectNameHttpApiHostModule.cs | 1 + .../MyProjectNameHttpApiHostModule.cs | 1 + .../MyCompanyName.MyProjectName.Web.Unified.csproj | 1 - 5 files changed, 3 insertions(+), 2 deletions(-) diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs index 5cf421b265..2bfbe80fdc 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs @@ -215,6 +215,7 @@ namespace MyCompanyName.MyProjectName var configuration = context.GetConfiguration(); options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]); options.OAuthClientSecret(configuration["AuthServer:SwaggerClientSecret"]); + options.OAuthScopes("MyProjectName"); }); app.UseAuditing(); diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyCompanyName.MyProjectName.HttpApi.HostWithIds.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyCompanyName.MyProjectName.HttpApi.HostWithIds.csproj index 196166e966..7483325232 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyCompanyName.MyProjectName.HttpApi.HostWithIds.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyCompanyName.MyProjectName.HttpApi.HostWithIds.csproj @@ -12,7 +12,6 @@ - diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyProjectNameHttpApiHostModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyProjectNameHttpApiHostModule.cs index 9a50940341..79fe76c574 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyProjectNameHttpApiHostModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyProjectNameHttpApiHostModule.cs @@ -227,6 +227,7 @@ namespace MyCompanyName.MyProjectName var configuration = context.ServiceProvider.GetRequiredService(); c.OAuthClientId(configuration["AuthServer:SwaggerClientId"]); c.OAuthClientSecret(configuration["AuthServer:SwaggerClientSecret"]); + c.OAuthScopes("MyProjectName"); }); app.UseAuditing(); diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs index db77093f0a..c118624476 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs @@ -182,6 +182,7 @@ namespace MyCompanyName.MyProjectName var configuration = context.GetConfiguration(); options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]); options.OAuthClientSecret(configuration["AuthServer:SwaggerClientSecret"]); + options.OAuthScopes("MyProjectName"); }); app.UseAuditing(); app.UseAbpSerilogEnrichers(); diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/MyCompanyName.MyProjectName.Web.Unified.csproj b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/MyCompanyName.MyProjectName.Web.Unified.csproj index be27176f6c..8124338091 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/MyCompanyName.MyProjectName.Web.Unified.csproj +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/MyCompanyName.MyProjectName.Web.Unified.csproj @@ -12,7 +12,6 @@ - all runtime; build; native; contentfiles; analyzers From 2f234b73c225b76a6d8567874915f18b76290c97 Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 16 Feb 2021 11:05:47 +0800 Subject: [PATCH 10/23] Remove Swashbuckle.AspNetCore package from Volo.CmsKit.Web.Unified.csproj --- .../host/Volo.CmsKit.Web.Unified/Volo.CmsKit.Web.Unified.csproj | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Volo.CmsKit.Web.Unified.csproj b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Volo.CmsKit.Web.Unified.csproj index f13af43d96..2595a1fde2 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Volo.CmsKit.Web.Unified.csproj +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Volo.CmsKit.Web.Unified.csproj @@ -10,7 +10,6 @@ - From 04e226f346e04636851bcaf7e0c2762464247aeb Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 26 Jan 2021 11:20:09 +0800 Subject: [PATCH 11/23] Update user properties when it's changed. Resolve #7430 --- .../Volo/Abp/Identity/ProfileAppService.cs | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/ProfileAppService.cs b/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/ProfileAppService.cs index 9097bbc144..ef3b5fd35d 100644 --- a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/ProfileAppService.cs +++ b/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/ProfileAppService.cs @@ -1,4 +1,5 @@ -using System.Linq; +using System; +using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Identity; @@ -37,17 +38,26 @@ namespace Volo.Abp.Identity var user = await UserManager.GetByIdAsync(CurrentUser.GetId()); - if (await SettingProvider.IsTrueAsync(IdentitySettingNames.User.IsUserNameUpdateEnabled)) + if (!string.Equals(user.UserName, input.UserName, StringComparison.InvariantCultureIgnoreCase)) { - (await UserManager.SetUserNameAsync(user, input.UserName)).CheckErrors(); + if (await SettingProvider.IsTrueAsync(IdentitySettingNames.User.IsUserNameUpdateEnabled)) + { + (await UserManager.SetUserNameAsync(user, input.UserName)).CheckErrors(); + } } - if (await SettingProvider.IsTrueAsync(IdentitySettingNames.User.IsEmailUpdateEnabled)) + if (!string.Equals(user.Email, input.Email, StringComparison.InvariantCultureIgnoreCase)) { - (await UserManager.SetEmailAsync(user, input.Email)).CheckErrors(); + if (await SettingProvider.IsTrueAsync(IdentitySettingNames.User.IsEmailUpdateEnabled)) + { + (await UserManager.SetEmailAsync(user, input.Email)).CheckErrors(); + } } - (await UserManager.SetPhoneNumberAsync(user, input.PhoneNumber)).CheckErrors(); + if (!string.Equals(user.PhoneNumber, input.PhoneNumber, StringComparison.InvariantCultureIgnoreCase)) + { + (await UserManager.SetPhoneNumberAsync(user, input.PhoneNumber)).CheckErrors(); + } user.Name = input.Name; user.Surname = input.Surname; From 739db98e161cfa5413d303cacce1cd78849a01f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Tue, 16 Feb 2021 16:40:54 +0300 Subject: [PATCH 12/23] Resolved #7750: Re-registering custom repositories should also override the default repositories for the same entity. --- .../ServiceCollectionRepositoryExtensions.cs | 38 ++++++++++++++----- .../AbpRepositoryConventionalRegistrar.cs | 3 ++ .../Repositories/RepositoryRegistrarBase.cs | 2 +- 3 files changed, 33 insertions(+), 10 deletions(-) diff --git a/framework/src/Volo.Abp.Ddd.Domain/Microsoft/Extensions/DependencyInjection/ServiceCollectionRepositoryExtensions.cs b/framework/src/Volo.Abp.Ddd.Domain/Microsoft/Extensions/DependencyInjection/ServiceCollectionRepositoryExtensions.cs index ac66f35864..60826a14dd 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Microsoft/Extensions/DependencyInjection/ServiceCollectionRepositoryExtensions.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Microsoft/Extensions/DependencyInjection/ServiceCollectionRepositoryExtensions.cs @@ -7,32 +7,36 @@ namespace Microsoft.Extensions.DependencyInjection { public static class ServiceCollectionRepositoryExtensions { - public static IServiceCollection AddDefaultRepository(this IServiceCollection services, Type entityType, Type repositoryImplementationType) + public static IServiceCollection AddDefaultRepository( + this IServiceCollection services, + Type entityType, + Type repositoryImplementationType, + bool replaceExisting = false) { //IReadOnlyBasicRepository var readOnlyBasicRepositoryInterface = typeof(IReadOnlyBasicRepository<>).MakeGenericType(entityType); if (readOnlyBasicRepositoryInterface.IsAssignableFrom(repositoryImplementationType)) { - services.TryAddTransient(readOnlyBasicRepositoryInterface, repositoryImplementationType); + RegisterService(services, readOnlyBasicRepositoryInterface, repositoryImplementationType, replaceExisting); //IReadOnlyRepository var readOnlyRepositoryInterface = typeof(IReadOnlyRepository<>).MakeGenericType(entityType); if (readOnlyRepositoryInterface.IsAssignableFrom(repositoryImplementationType)) { - services.TryAddTransient(readOnlyRepositoryInterface, repositoryImplementationType); + RegisterService(services, readOnlyRepositoryInterface, repositoryImplementationType, replaceExisting); } //IBasicRepository var basicRepositoryInterface = typeof(IBasicRepository<>).MakeGenericType(entityType); if (basicRepositoryInterface.IsAssignableFrom(repositoryImplementationType)) { - services.TryAddTransient(basicRepositoryInterface, repositoryImplementationType); + RegisterService(services, basicRepositoryInterface, repositoryImplementationType, replaceExisting); //IRepository var repositoryInterface = typeof(IRepository<>).MakeGenericType(entityType); if (repositoryInterface.IsAssignableFrom(repositoryImplementationType)) { - services.TryAddTransient(repositoryInterface, repositoryImplementationType); + RegisterService(services, repositoryInterface, repositoryImplementationType, replaceExisting); } } } @@ -44,26 +48,26 @@ namespace Microsoft.Extensions.DependencyInjection var readOnlyBasicRepositoryInterfaceWithPk = typeof(IReadOnlyBasicRepository<,>).MakeGenericType(entityType, primaryKeyType); if (readOnlyBasicRepositoryInterfaceWithPk.IsAssignableFrom(repositoryImplementationType)) { - services.TryAddTransient(readOnlyBasicRepositoryInterfaceWithPk, repositoryImplementationType); + RegisterService(services, readOnlyBasicRepositoryInterfaceWithPk, repositoryImplementationType, replaceExisting); //IReadOnlyRepository var readOnlyRepositoryInterfaceWithPk = typeof(IReadOnlyRepository<,>).MakeGenericType(entityType, primaryKeyType); if (readOnlyRepositoryInterfaceWithPk.IsAssignableFrom(repositoryImplementationType)) { - services.TryAddTransient(readOnlyRepositoryInterfaceWithPk, repositoryImplementationType); + RegisterService(services, readOnlyRepositoryInterfaceWithPk, repositoryImplementationType, replaceExisting); } //IBasicRepository var basicRepositoryInterfaceWithPk = typeof(IBasicRepository<,>).MakeGenericType(entityType, primaryKeyType); if (basicRepositoryInterfaceWithPk.IsAssignableFrom(repositoryImplementationType)) { - services.TryAddTransient(basicRepositoryInterfaceWithPk, repositoryImplementationType); + RegisterService(services, basicRepositoryInterfaceWithPk, repositoryImplementationType, replaceExisting); //IRepository var repositoryInterfaceWithPk = typeof(IRepository<,>).MakeGenericType(entityType, primaryKeyType); if (repositoryInterfaceWithPk.IsAssignableFrom(repositoryImplementationType)) { - services.TryAddTransient(repositoryInterfaceWithPk, repositoryImplementationType); + RegisterService(services, repositoryInterfaceWithPk, repositoryImplementationType, replaceExisting); } } } @@ -71,5 +75,21 @@ namespace Microsoft.Extensions.DependencyInjection return services; } + + private static void RegisterService( + IServiceCollection services, + Type serviceType, + Type implementationType, + bool replaceExisting) + { + if (replaceExisting) + { + services.Replace(ServiceDescriptor.Transient(serviceType, implementationType)); + } + else + { + services.TryAddTransient(serviceType, implementationType); + } + } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/AbpRepositoryConventionalRegistrar.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/AbpRepositoryConventionalRegistrar.cs index f11812f2ea..f7b9527aa0 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/AbpRepositoryConventionalRegistrar.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/AbpRepositoryConventionalRegistrar.cs @@ -6,6 +6,9 @@ using Volo.Abp.DependencyInjection; namespace Volo.Abp.Domain.Repositories { + /* Repositories are not injected by class by default. + * This class specializes repository registration to apply this rule. + */ public class AbpRepositoryConventionalRegistrar : DefaultConventionalRegistrar { public static bool ExposeRepositoryClasses { get; set; } diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryRegistrarBase.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryRegistrarBase.cs index f3b2fc388f..548a636eff 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryRegistrarBase.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryRegistrarBase.cs @@ -20,7 +20,7 @@ namespace Volo.Abp.Domain.Repositories { foreach (var customRepository in Options.CustomRepositories) { - Options.Services.AddDefaultRepository(customRepository.Key, customRepository.Value); + Options.Services.AddDefaultRepository(customRepository.Key, customRepository.Value, replaceExisting: true); } if (Options.RegisterDefaultRepositories) From 48e3f6d78a35404704ed0e8655c0d1193c42b052 Mon Sep 17 00:00:00 2001 From: enisn Date: Wed, 17 Feb 2021 10:21:40 +0300 Subject: [PATCH 13/23] CmsKit - Remove BlogLookupDto --- .../Volo/CmsKit/Admin/Blogs/BlogLookupDto.cs | 10 ---------- .../Admin/CmsKitAdminApplicationAutoMapperProfile.cs | 2 -- 2 files changed, 12 deletions(-) delete mode 100644 modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/BlogLookupDto.cs diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/BlogLookupDto.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/BlogLookupDto.cs deleted file mode 100644 index ed514d839d..0000000000 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Blogs/BlogLookupDto.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; - -namespace Volo.CmsKit.Admin.Blogs -{ - public class BlogLookupDto - { - public Guid Id { get; set; } - public string Name { get; set; } - } -} diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs index 173897f0a4..5a9401c910 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs @@ -30,8 +30,6 @@ namespace Volo.CmsKit.Admin CreateMap(MemberList.Destination) .ReverseMap(); - CreateMap(MemberList.Destination); - CreateMap(MemberList.Destination); CreateMap(); From 47549c9a7465b918e97ae6f524a7e313cc211e0f Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Wed, 17 Feb 2021 11:52:19 +0300 Subject: [PATCH 14/23] domain object refactoring --- .../Volo/CmsKit/Contents/Content.cs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/Content.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/Content.cs index e2d4a2a4ac..434ae4847b 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/Content.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/Content.cs @@ -8,12 +8,16 @@ namespace Volo.CmsKit.Contents { public class Content : FullAuditedAggregateRoot, IMultiTenant { + [CanBeNull] public virtual Guid? TenantId { get; protected set; } + [NotNull] public virtual string EntityType { get; protected set; } - public virtual string EntityId { get; set; } + [NotNull] + public virtual string EntityId { get; protected set; } + [NotNull] public virtual string Value { get; protected set; } protected Content() @@ -23,16 +27,22 @@ namespace Volo.CmsKit.Contents public Content(Guid id, [NotNull] string entityType, [NotNull] string entityId, [NotNull] string value, Guid? tenantId = null) : base(id) { - EntityType = Check.NotNullOrWhiteSpace(entityType, nameof(entityType), ContentConsts.MaxEntityTypeLength); EntityId = Check.NotNullOrWhiteSpace(entityId, nameof(entityId), ContentConsts.MaxEntityIdLength); - SetValue(value); + EntityType = Check.NotNullOrEmpty(entityType, nameof(entityType), ContentConsts.MaxEntityTypeLength); + Value = Check.NotNullOrEmpty(value, nameof(value), ContentConsts.MaxValueLength); TenantId = tenantId; } public void SetValue([NotNull] string value) { - Value = Check.NotNullOrWhiteSpace(value, nameof(value), ContentConsts.MaxValueLength); + Value = Check.NotNullOrEmpty(value, nameof(value), ContentConsts.MaxValueLength); + } + + public void SetEntity([NotNull] string entityType, [NotNull] string entityId) + { + EntityType = Check.NotNullOrEmpty(entityType, nameof(entityType), ContentConsts.MaxEntityTypeLength); + EntityId = Check.NotNullOrWhiteSpace(entityId, nameof(entityId), ContentConsts.MaxEntityIdLength); } } } From d02412d2ccb8133519939629b0472239607ff8ee Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Wed, 17 Feb 2021 11:52:34 +0300 Subject: [PATCH 15/23] pass cancellation token --- .../Volo/CmsKit/Contents/ContentManager.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/ContentManager.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/ContentManager.cs index 047d923ad6..4ca9554289 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/ContentManager.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/ContentManager.cs @@ -20,12 +20,13 @@ namespace Volo.CmsKit.Contents public async Task InsertAsync(Content content, CancellationToken cancellationToken = default) { - if (await ContentRepository.ExistsAsync(content.EntityType, content.EntityId, content.TenantId, cancellationToken)) + if (await ContentRepository.ExistsAsync(content.EntityType, content.EntityId, content.TenantId, + cancellationToken)) { throw new ContentAlreadyExistException(content.EntityType, content.EntityId); } - return await ContentRepository.InsertAsync(content); + return await ContentRepository.InsertAsync(content, cancellationToken: cancellationToken); } } -} +} \ No newline at end of file From 027305ec824d48813f50abc58b67f0309bcb6aca Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Wed, 17 Feb 2021 11:52:45 +0300 Subject: [PATCH 16/23] app service renaming --- .../{ContentAppService.cs => ContentPublicAppService.cs} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Contents/{ContentAppService.cs => ContentPublicAppService.cs} (78%) diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Contents/ContentAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Contents/ContentPublicAppService.cs similarity index 78% rename from modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Contents/ContentAppService.cs rename to modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Contents/ContentPublicAppService.cs index 94cffea154..f00f2bdb2d 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Contents/ContentAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Contents/ContentPublicAppService.cs @@ -3,11 +3,11 @@ using Volo.CmsKit.Contents; namespace Volo.CmsKit.Public.Contents { - public class ContentAppService : CmsKitAppServiceBase, IContentAppService + public class ContentPublicAppService : CmsKitAppServiceBase, IContentAppService { protected readonly IContentRepository ContentRepository; - public ContentAppService(IContentRepository contentRepository) + public ContentPublicAppService(IContentRepository contentRepository) { ContentRepository = contentRepository; } From 2e5b6c319af94b303af667857e5e39825953d7e5 Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Wed, 17 Feb 2021 11:52:59 +0300 Subject: [PATCH 17/23] app service renaming --- .../Pages/{PageAppService.cs => PagePublicAppService.cs} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/{PageAppService.cs => PagePublicAppService.cs} (78%) diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PageAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PagePublicAppService.cs similarity index 78% rename from modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PageAppService.cs rename to modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PagePublicAppService.cs index 1e1d63bf71..bb2d1c5a70 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PageAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PagePublicAppService.cs @@ -3,11 +3,11 @@ using Volo.CmsKit.Pages; namespace Volo.CmsKit.Public.Pages { - public class PageAppService : CmsKitPublicAppServiceBase, IPageAppService + public class PagePublicAppService : CmsKitPublicAppServiceBase, IPageAppService { protected readonly IPageRepository PageRepository; - public PageAppService(IPageRepository pageRepository) + public PagePublicAppService(IPageRepository pageRepository) { PageRepository = pageRepository; } From 5accac6a1c6f74de7cbe62d8bfaa109cada50f42 Mon Sep 17 00:00:00 2001 From: maliming Date: Wed, 17 Feb 2021 17:11:49 +0800 Subject: [PATCH 18/23] Add IgnoreMultiTenancy to AbpIdentityServerMongoDbContext. --- .../IdentityServer/MongoDB/AbpIdentityServerMongoDbContext.cs | 2 ++ .../IdentityServer/MongoDB/IAbpIdentityServerMongoDbContext.cs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/AbpIdentityServerMongoDbContext.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/AbpIdentityServerMongoDbContext.cs index eddf19cd29..49341771ca 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/AbpIdentityServerMongoDbContext.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/AbpIdentityServerMongoDbContext.cs @@ -7,9 +7,11 @@ using Volo.Abp.IdentityServer.Devices; using Volo.Abp.IdentityServer.Grants; using Volo.Abp.IdentityServer.IdentityResources; using Volo.Abp.MongoDB; +using Volo.Abp.MultiTenancy; namespace Volo.Abp.IdentityServer.MongoDB { + [IgnoreMultiTenancy] [ConnectionStringName(AbpIdentityServerDbProperties.ConnectionStringName)] public class AbpIdentityServerMongoDbContext : AbpMongoDbContext, IAbpIdentityServerMongoDbContext { diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/IAbpIdentityServerMongoDbContext.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/IAbpIdentityServerMongoDbContext.cs index 5b521f2600..ad9c90b62c 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/IAbpIdentityServerMongoDbContext.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/IAbpIdentityServerMongoDbContext.cs @@ -7,9 +7,11 @@ using Volo.Abp.IdentityServer.Devices; using Volo.Abp.IdentityServer.Grants; using Volo.Abp.IdentityServer.IdentityResources; using Volo.Abp.MongoDB; +using Volo.Abp.MultiTenancy; namespace Volo.Abp.IdentityServer.MongoDB { + [IgnoreMultiTenancy] [ConnectionStringName(AbpIdentityServerDbProperties.ConnectionStringName)] public interface IAbpIdentityServerMongoDbContext : IAbpMongoDbContext { From 5d03d0e8c6d3e3de72f15c7f519dbb697310e125 Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Wed, 17 Feb 2021 16:07:30 +0300 Subject: [PATCH 19/23] make methods virtual --- .../Volo/CmsKit/Admin/Contents/ContentAdminAppService.cs | 2 +- .../Volo/CmsKit/Contents/ContentManager.cs | 2 +- .../Volo/CmsKit/Contents/EfCoreContentRepository.cs | 8 ++++---- .../CmsKit/MongoDB/Contents/MongoContentRepository.cs | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Contents/ContentAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Contents/ContentAdminAppService.cs index 8ec8559e34..020b4fd29e 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Contents/ContentAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Contents/ContentAdminAppService.cs @@ -56,7 +56,7 @@ namespace Volo.CmsKit.Admin.Contents return MapToGetOutputDto(entity); } - public async Task GetAsync( + public virtual async Task GetAsync( [NotNull] string entityType, [NotNull] string entityId) { diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/ContentManager.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/ContentManager.cs index 4ca9554289..707f15bbb9 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/ContentManager.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/ContentManager.cs @@ -18,7 +18,7 @@ namespace Volo.CmsKit.Contents ContentRepository = contentRepository; } - public async Task InsertAsync(Content content, CancellationToken cancellationToken = default) + public virtual async Task InsertAsync(Content content, CancellationToken cancellationToken = default) { if (await ContentRepository.ExistsAsync(content.EntityType, content.EntityId, content.TenantId, cancellationToken)) diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Contents/EfCoreContentRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Contents/EfCoreContentRepository.cs index 884c5e9b01..e8b88161ca 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Contents/EfCoreContentRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Contents/EfCoreContentRepository.cs @@ -15,7 +15,7 @@ namespace Volo.CmsKit.Contents { } - public Task GetAsync( + public virtual Task GetAsync( string entityType, string entityId, Guid? tenantId = null, @@ -29,7 +29,7 @@ namespace Volo.CmsKit.Contents ); } - public Task FindAsync( + public virtual Task FindAsync( string entityType, string entityId, Guid? tenantId = null, @@ -43,7 +43,7 @@ namespace Volo.CmsKit.Contents ); } - public Task DeleteAsync( + public virtual Task DeleteAsync( string entityType, string entityId, Guid? tenantId = null, @@ -56,7 +56,7 @@ namespace Volo.CmsKit.Contents cancellationToken: GetCancellationToken(cancellationToken)); } - public async Task ExistsAsync( + public virtual async Task ExistsAsync( [NotNull] string entityType, [NotNull] string entityId, Guid? tenantId = null, diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Contents/MongoContentRepository.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Contents/MongoContentRepository.cs index 1068c352d5..fed8fe6e2e 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Contents/MongoContentRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Contents/MongoContentRepository.cs @@ -15,7 +15,7 @@ namespace Volo.CmsKit.MongoDB.Contents { } - public Task GetAsync( + public virtual Task GetAsync( string entityType, string entityId, Guid? tenantId = null, @@ -29,7 +29,7 @@ namespace Volo.CmsKit.MongoDB.Contents ); } - public Task FindAsync( + public virtual Task FindAsync( string entityType, string entityId, Guid? tenantId = null, @@ -43,7 +43,7 @@ namespace Volo.CmsKit.MongoDB.Contents ); } - public Task DeleteAsync(string entityType, string entityId, Guid? tenantId = null, CancellationToken cancellationToken = default) + public virtual Task DeleteAsync(string entityType, string entityId, Guid? tenantId = null, CancellationToken cancellationToken = default) { return DeleteAsync(x => x.EntityType == entityType && @@ -52,7 +52,7 @@ namespace Volo.CmsKit.MongoDB.Contents cancellationToken: GetCancellationToken(cancellationToken)); } - public async Task ExistsAsync([NotNull] string entityType, [NotNull] string entityId, Guid? tenantId = null, CancellationToken cancellationToken = default) + public virtual async Task ExistsAsync([NotNull] string entityType, [NotNull] string entityId, Guid? tenantId = null, CancellationToken cancellationToken = default) { return await (await GetMongoQueryableAsync(cancellationToken)).AnyAsync(x => x.EntityType == entityType && From cd3bd24c702059480251c3d4eb68228523986bfd Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Wed, 17 Feb 2021 16:07:46 +0300 Subject: [PATCH 20/23] use protected property instead of variable --- .../Volo/CmsKit/Public/Contents/ContentPublicAppService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Contents/ContentPublicAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Contents/ContentPublicAppService.cs index f00f2bdb2d..0fc31e1b4b 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Contents/ContentPublicAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Contents/ContentPublicAppService.cs @@ -5,7 +5,7 @@ namespace Volo.CmsKit.Public.Contents { public class ContentPublicAppService : CmsKitAppServiceBase, IContentAppService { - protected readonly IContentRepository ContentRepository; + protected IContentRepository ContentRepository { get; } public ContentPublicAppService(IContentRepository contentRepository) { From 0f434debf00caf240f8070a3bf34f13ec8a8c43f Mon Sep 17 00:00:00 2001 From: Mehmet Erim <34455572+mehmet-erim@users.noreply.github.com> Date: Thu, 18 Feb 2021 13:58:44 +0300 Subject: [PATCH 21/23] Update Multi-Tenancy.md --- docs/en/UI/Angular/Multi-Tenancy.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/UI/Angular/Multi-Tenancy.md b/docs/en/UI/Angular/Multi-Tenancy.md index 7622db6de0..cded16e7d4 100644 --- a/docs/en/UI/Angular/Multi-Tenancy.md +++ b/docs/en/UI/Angular/Multi-Tenancy.md @@ -91,10 +91,10 @@ export const environment = { > **Important Note:** The `application.baseUrl` and the `{0}` placeholder in the value of the `baseUrl` property are required to be able to get tenant from running URL. Other placeholders in API URLs are optional. -After the configuration above, if your app runs on the `mytenant1.mydomain.com`, the app will get tenant name as **mytenant1** and replace the environment object in `ConfigState` on app initialization as follows: +After the configuration above, if your app runs on the `mytenant1.mydomain.com`, the app will get tenant name as **mytenant1** and replace the environment object in `EnvironmentService` on app initialization as follows: ```js -// environment object in ConfigState +// environment object in EnvironmentService { //... From 395fa00ae650f23cddad30bcf229720023e2f8e9 Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Thu, 18 Feb 2021 17:54:35 +0300 Subject: [PATCH 22/23] rename page public app service type. --- ...{IPageAppService.cs => IPagePublicAppService.cs} | 2 +- .../CmsKit/Public/Pages/PagePublicAppService.cs | 2 +- .../CmsKit/Public/Pages/PagesPublicController.cs | 13 ++++++++----- .../Controllers/PageController.cs | 4 ++-- .../Components/Pages/DefaultPageViewComponent.cs | 4 ++-- .../Pages/PagePublicAppService_Tests.cs | 4 ++-- 6 files changed, 16 insertions(+), 13 deletions(-) rename modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Pages/{IPageAppService.cs => IPagePublicAppService.cs} (79%) diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Pages/IPageAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Pages/IPagePublicAppService.cs similarity index 79% rename from modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Pages/IPageAppService.cs rename to modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Pages/IPagePublicAppService.cs index 7363d32a3c..d249fef9b0 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Pages/IPageAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Pages/IPagePublicAppService.cs @@ -3,7 +3,7 @@ using JetBrains.Annotations; namespace Volo.CmsKit.Public.Pages { - public interface IPageAppService + public interface IPagePublicAppService { Task FindByUrlAsync([NotNull] string url); } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PagePublicAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PagePublicAppService.cs index bb2d1c5a70..c8da8f33aa 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PagePublicAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PagePublicAppService.cs @@ -3,7 +3,7 @@ using Volo.CmsKit.Pages; namespace Volo.CmsKit.Public.Pages { - public class PagePublicAppService : CmsKitPublicAppServiceBase, IPageAppService + public class PagePublicAppService : CmsKitPublicAppServiceBase, IPagePublicAppService { protected readonly IPageRepository PageRepository; diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Pages/PagesPublicController.cs b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Pages/PagesPublicController.cs index a9c6cd70e4..b56d8b6ec1 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Pages/PagesPublicController.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Pages/PagesPublicController.cs @@ -1,24 +1,27 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Volo.Abp; +using Volo.Abp.GlobalFeatures; +using Volo.CmsKit.GlobalFeatures; namespace Volo.CmsKit.Public.Pages { + [RequiresGlobalFeature(typeof(PagesFeature))] [RemoteService(Name = CmsKitPublicRemoteServiceConsts.RemoteServiceName)] [Area("cms-kit")] - [Route("api/cms-kit-public/comments")] - public class PagesPublicController : IPageAppService + [Route("api/cms-kit-public/pages")] + public class PagesPublicController : IPagePublicAppService { - protected readonly IPageAppService PageAppService; + protected IPagePublicAppService PageAppService { get; } - public PagesPublicController(IPageAppService pageAppService) + public PagesPublicController(IPagePublicAppService pageAppService) { PageAppService = pageAppService; } [HttpGet] [Route("url/{url}")] - public Task FindByUrlAsync(string url) + public virtual Task FindByUrlAsync(string url) { return PageAppService.FindByUrlAsync(url); } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Controllers/PageController.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Controllers/PageController.cs index 5d3d5acc9c..d6419bb903 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Controllers/PageController.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Controllers/PageController.cs @@ -14,9 +14,9 @@ namespace Volo.CmsKit.Public.Web.Controllers [RequiresGlobalFeature(typeof(PagesFeature))] public class PageController : CmsKitPublicControllerBase { - protected IPageAppService PageAppService { get; } + protected IPagePublicAppService PageAppService { get; } - public PageController(IPageAppService pageAppService) + public PageController(IPagePublicAppService pageAppService) { PageAppService = pageAppService; } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Pages/DefaultPageViewComponent.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Pages/DefaultPageViewComponent.cs index c3e02b1f90..efa37f6611 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Pages/DefaultPageViewComponent.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Pages/DefaultPageViewComponent.cs @@ -9,9 +9,9 @@ namespace Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Pages [ViewComponent(Name = "CmsDefaultPage")] public class DefaultPageViewComponent : AbpViewComponent { - protected readonly IPageAppService PageAppService; + protected readonly IPagePublicAppService PageAppService; - public DefaultPageViewComponent(IPageAppService pageAppService) + public DefaultPageViewComponent(IPagePublicAppService pageAppService) { PageAppService = pageAppService; } diff --git a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Pages/PagePublicAppService_Tests.cs b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Pages/PagePublicAppService_Tests.cs index c0943a1279..5da1780b64 100644 --- a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Pages/PagePublicAppService_Tests.cs +++ b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Pages/PagePublicAppService_Tests.cs @@ -9,12 +9,12 @@ namespace Volo.CmsKit.Pages public class PagePublicAppService_Tests : CmsKitApplicationTestBase { private readonly CmsKitTestData _data; - private readonly IPageAppService _pageAppService; + private readonly IPagePublicAppService _pageAppService; public PagePublicAppService_Tests() { _data = GetRequiredService(); - _pageAppService = GetRequiredService(); + _pageAppService = GetRequiredService(); } [Fact] From 9273f9c8a8e982c6b289d64fdf7193dab30da693 Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Fri, 19 Feb 2021 10:38:13 +0800 Subject: [PATCH 23/23] Remove email settings from the appsettings.json files --- .../EmailSettingGroupViewComponent.razor.cs | 2 +- .../appsettings.json | 11 ----------- .../appsettings.json | 11 ----------- .../appsettings.json | 11 ----------- .../MyCompanyName.MyProjectName.Web/appsettings.json | 11 ----------- 5 files changed, 1 insertion(+), 45 deletions(-) diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/EmailSettingGroup/EmailSettingGroupViewComponent.razor.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/EmailSettingGroup/EmailSettingGroupViewComponent.razor.cs index e88d9cdf3b..0836aa88a9 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/EmailSettingGroup/EmailSettingGroupViewComponent.razor.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/EmailSettingGroup/EmailSettingGroupViewComponent.razor.cs @@ -35,7 +35,7 @@ namespace Volo.Abp.SettingManagement.Blazor.Pages.SettingManagement.EmailSetting { await EmailSettingsAppService.UpdateAsync(ObjectMapper.Map(EmailSettings)); - await UiMessageService.Success(L["SavedSuccessfully"]); + await UiMessageService.Success(L["SuccessfullySaved"]); } } } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/appsettings.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/appsettings.json index 12bd4f78bb..33a3d0140a 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/appsettings.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/appsettings.json @@ -16,16 +16,5 @@ }, "StringEncryption": { "DefaultPassPhrase": "gsKnGZ041HLL4IM8" - }, - "Settings": { - "Abp.Mailing.Smtp.Host": "127.0.0.1", - "Abp.Mailing.Smtp.Port": "25", - "Abp.Mailing.Smtp.UserName": "", - "Abp.Mailing.Smtp.Password": "", - "Abp.Mailing.Smtp.Domain": "", - "Abp.Mailing.Smtp.EnableSsl": "false", - "Abp.Mailing.Smtp.UseDefaultCredentials": "true", - "Abp.Mailing.DefaultFromAddress": "noreply@abp.io", - "Abp.Mailing.DefaultFromDisplayName": "ABP application" } } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/appsettings.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/appsettings.json index 73d80aeec4..df8977967b 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/appsettings.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/appsettings.json @@ -15,16 +15,5 @@ }, "StringEncryption": { "DefaultPassPhrase": "gsKnGZ041HLL4IM8" - }, - "Settings": { - "Abp.Mailing.Smtp.Host": "127.0.0.1", - "Abp.Mailing.Smtp.Port": "25", - "Abp.Mailing.Smtp.UserName": "", - "Abp.Mailing.Smtp.Password": "", - "Abp.Mailing.Smtp.Domain": "", - "Abp.Mailing.Smtp.EnableSsl": "false", - "Abp.Mailing.Smtp.UseDefaultCredentials": "true", - "Abp.Mailing.DefaultFromAddress": "noreply@abp.io", - "Abp.Mailing.DefaultFromDisplayName": "ABP application" } } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/appsettings.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/appsettings.json index 0e667e5d73..ced2b70f07 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/appsettings.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/appsettings.json @@ -12,16 +12,5 @@ }, "StringEncryption": { "DefaultPassPhrase": "gsKnGZ041HLL4IM8" - }, - "Settings": { - "Abp.Mailing.Smtp.Host": "127.0.0.1", - "Abp.Mailing.Smtp.Port": "25", - "Abp.Mailing.Smtp.UserName": "", - "Abp.Mailing.Smtp.Password": "", - "Abp.Mailing.Smtp.Domain": "", - "Abp.Mailing.Smtp.EnableSsl": "false", - "Abp.Mailing.Smtp.UseDefaultCredentials": "true", - "Abp.Mailing.DefaultFromAddress": "noreply@abp.io", - "Abp.Mailing.DefaultFromDisplayName": "ABP application" } } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/appsettings.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/appsettings.json index 9c81e66699..f6f012fcfb 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/appsettings.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/appsettings.json @@ -11,16 +11,5 @@ }, "StringEncryption": { "DefaultPassPhrase": "gsKnGZ041HLL4IM8" - }, - "Settings": { - "Abp.Mailing.Smtp.Host": "127.0.0.1", - "Abp.Mailing.Smtp.Port": "25", - "Abp.Mailing.Smtp.UserName": "", - "Abp.Mailing.Smtp.Password": "", - "Abp.Mailing.Smtp.Domain": "", - "Abp.Mailing.Smtp.EnableSsl": "false", - "Abp.Mailing.Smtp.UseDefaultCredentials": "true", - "Abp.Mailing.DefaultFromAddress": "noreply@abp.io", - "Abp.Mailing.DefaultFromDisplayName": "ABP application" } }