From 5a54755ab9b19c6d05b5779fa2b6df83b6dfcfa9 Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Wed, 20 Mar 2019 13:23:33 +0300 Subject: [PATCH 01/20] No need to ModelBuilderConfigurationOptions parameter --- .../IdentityDbContextModelBuilderExtensions.cs | 2 +- .../AbpUsersDbContextModelCreatingExtensions.cs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/IdentityDbContextModelBuilderExtensions.cs b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/IdentityDbContextModelBuilderExtensions.cs index ce8e1e47d5..0e3fb21688 100644 --- a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/IdentityDbContextModelBuilderExtensions.cs +++ b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/IdentityDbContextModelBuilderExtensions.cs @@ -25,7 +25,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore b.ConfigureFullAudited(); b.ConfigureExtraProperties(); b.ConfigureConcurrencyStamp(); - b.ConfigureAbpUser(options); + b.ConfigureAbpUser(); b.Property(u => u.NormalizedUserName).IsRequired().HasMaxLength(IdentityUserConsts.MaxNormalizedUserNameLength).HasColumnName(nameof(IdentityUser.NormalizedUserName)); b.Property(u => u.NormalizedEmail).HasMaxLength(IdentityUserConsts.MaxNormalizedEmailLength).HasColumnName(nameof(IdentityUser.NormalizedEmail)); diff --git a/modules/users/src/Volo.Abp.Users.EntityFrameworkCore/Volo/Abp/Users/EntityFrameworkCore/AbpUsersDbContextModelCreatingExtensions.cs b/modules/users/src/Volo.Abp.Users.EntityFrameworkCore/Volo/Abp/Users/EntityFrameworkCore/AbpUsersDbContextModelCreatingExtensions.cs index 108b3f4278..1b95984e4b 100644 --- a/modules/users/src/Volo.Abp.Users.EntityFrameworkCore/Volo/Abp/Users/EntityFrameworkCore/AbpUsersDbContextModelCreatingExtensions.cs +++ b/modules/users/src/Volo.Abp.Users.EntityFrameworkCore/Volo/Abp/Users/EntityFrameworkCore/AbpUsersDbContextModelCreatingExtensions.cs @@ -1,12 +1,11 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; -using Volo.Abp.EntityFrameworkCore.Modeling; namespace Volo.Abp.Users.EntityFrameworkCore { public static class AbpUsersDbContextModelCreatingExtensions { - public static void ConfigureAbpUser(this EntityTypeBuilder b, ModelBuilderConfigurationOptions options) + public static void ConfigureAbpUser(this EntityTypeBuilder b) where TUser : class, IUser { b.Property(u => u.TenantId).HasColumnName(nameof(IUser.TenantId)); From 5ebe61562e0016f5c01e7ac756bd3ef5f20e7ef2 Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Wed, 20 Mar 2019 13:37:33 +0300 Subject: [PATCH 02/20] Added AppUser to the MVC template --- .../Users/AppUser.cs | 53 +++++++++++++++++ .../MyProjectNameMigrationsDbContext.cs | 12 ++++ .../MyProjectNameDbContext.cs | 21 +++++++ .../MyProjectNameDbContextFactory.cs | 29 --------- ...ectNameDbContextModelCreatingExtensions.cs | 29 +++++---- .../MongoDb/MyProjectNameMongoDbContext.cs | 16 ++++- ...ame.MyProjectName.Application.Tests.csproj | 2 +- .../MyProjectNameApplicationTestModule.cs | 4 +- .../Samples/SampleTest.cs | 26 -------- .../Samples/SampleTests.cs | 59 +++++++++++++++++++ 10 files changed, 176 insertions(+), 75 deletions(-) create mode 100644 templates/mvc/src/MyCompanyName.MyProjectName.Domain/Users/AppUser.cs delete mode 100644 templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/EntityFrameworkCore/MyProjectNameDbContextFactory.cs delete mode 100644 templates/mvc/test/MyCompanyName.MyProjectName.Application.Tests/Samples/SampleTest.cs create mode 100644 templates/mvc/test/MyCompanyName.MyProjectName.Application.Tests/Samples/SampleTests.cs diff --git a/templates/mvc/src/MyCompanyName.MyProjectName.Domain/Users/AppUser.cs b/templates/mvc/src/MyCompanyName.MyProjectName.Domain/Users/AppUser.cs new file mode 100644 index 0000000000..587c9d9440 --- /dev/null +++ b/templates/mvc/src/MyCompanyName.MyProjectName.Domain/Users/AppUser.cs @@ -0,0 +1,53 @@ +using System; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.Users; + +namespace MyCompanyName.MyProjectName.Users +{ + /* This entity shares the same table/collection ("AbpUsers" by default) with the + * IdentityUser entity of the Identity module. + * + * - You can define your custom properties into this class. + * - You never create or delete this entity, becase it is Identity module's job. + * - You can query users from database with this entity. + * - You can update values of your custom properties. + */ + public class AppUser : FullAuditedAggregateRoot, IUser + { + #region Base properties + + /* These properties are shared with the IdentityUser entity of the Identity module. + * Do not change these properties through this class. Instead, use Identity module + * services (like IdentityUserManager) to change them. + * So, this properties are designed as read only! + */ + + public virtual Guid? TenantId { get; private set; } + + public virtual string UserName { get; private set; } + + public virtual string Name { get; private set; } + + public virtual string Surname { get; private set; } + + public virtual string Email { get; private set; } + + public virtual bool EmailConfirmed { get; private set; } + + public virtual string PhoneNumber { get; private set; } + + public virtual bool PhoneNumberConfirmed { get; private set; } + + #endregion + + /* Add your own properties here. Example: + * + * public virtual string MyProperty { get; set; } + */ + + private AppUser() + { + + } + } +} diff --git a/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/MyProjectNameMigrationsDbContext.cs b/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/MyProjectNameMigrationsDbContext.cs index 4d8e7bd10f..5fe35526b0 100644 --- a/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/MyProjectNameMigrationsDbContext.cs +++ b/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/MyProjectNameMigrationsDbContext.cs @@ -2,6 +2,7 @@ using Volo.Abp.AuditLogging.EntityFrameworkCore; using Volo.Abp.BackgroundJobs.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.Identity; using Volo.Abp.Identity.EntityFrameworkCore; using Volo.Abp.PermissionManagement.EntityFrameworkCore; using Volo.Abp.SettingManagement.EntityFrameworkCore; @@ -20,12 +21,23 @@ namespace MyCompanyName.MyProjectName.EntityFrameworkCore { base.OnModelCreating(builder); + /* Include modules to your migration db context */ + builder.ConfigurePermissionManagement(); builder.ConfigureSettingManagement(); builder.ConfigureBackgroundJobs(); builder.ConfigureAuditLogging(); builder.ConfigureIdentity(); + /* Configure customizations for entities from the modules included */ + + builder.Entity(b => + { + b.ConfigureCustomUserProperties(); + }); + + /* Configure your own tables/entities inside the ConfigureMyProjectName method */ + builder.ConfigureMyProjectName(); } } diff --git a/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/EntityFrameworkCore/MyProjectNameDbContext.cs b/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/EntityFrameworkCore/MyProjectNameDbContext.cs index fb4008aff4..5b40bb037a 100644 --- a/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/EntityFrameworkCore/MyProjectNameDbContext.cs +++ b/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/EntityFrameworkCore/MyProjectNameDbContext.cs @@ -1,12 +1,17 @@ using Microsoft.EntityFrameworkCore; +using MyCompanyName.MyProjectName.Users; using Volo.Abp.Data; using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore.Modeling; +using Volo.Abp.Users.EntityFrameworkCore; namespace MyCompanyName.MyProjectName.EntityFrameworkCore { [ConnectionStringName("Default")] public class MyProjectNameDbContext : AbpDbContext { + public DbSet Users { get; set; } + public MyProjectNameDbContext(DbContextOptions options) : base(options) { @@ -17,6 +22,22 @@ namespace MyCompanyName.MyProjectName.EntityFrameworkCore { base.OnModelCreating(builder); + /* Configure your shared tables (with included modules) here */ + + builder.Entity(b => + { + b.ToTable("AbpUsers"); //Sharing the same table "AbpUsers" with the IdentityUser + + b.ConfigureFullAudited(); + b.ConfigureExtraProperties(); + b.ConfigureConcurrencyStamp(); + b.ConfigureAbpUser(); + + b.ConfigureCustomUserProperties(); + }); + + /* Configure your own tables/entities inside the ConfigureMyProjectName method */ + builder.ConfigureMyProjectName(); } } diff --git a/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/EntityFrameworkCore/MyProjectNameDbContextFactory.cs b/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/EntityFrameworkCore/MyProjectNameDbContextFactory.cs deleted file mode 100644 index c878f12fd5..0000000000 --- a/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/EntityFrameworkCore/MyProjectNameDbContextFactory.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System.IO; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Design; -using Microsoft.Extensions.Configuration; - -namespace MyCompanyName.MyProjectName.EntityFrameworkCore -{ - public class MyProjectNameDbContextFactory : IDesignTimeDbContextFactory - { - public MyProjectNameDbContext CreateDbContext(string[] args) - { - var configuration = BuildConfiguration(); - - var builder = new DbContextOptionsBuilder() - .UseSqlServer(configuration.GetConnectionString("Default")); - - return new MyProjectNameDbContext(builder.Options); - } - - private static IConfigurationRoot BuildConfiguration() - { - var builder = new ConfigurationBuilder() - .SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../MyCompanyName.MyProjectName.Web/")) - .AddJsonFile("appsettings.json", optional: false); - - return builder.Build(); - } - } -} diff --git a/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/EntityFrameworkCore/MyProjectNameDbContextModelCreatingExtensions.cs b/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/EntityFrameworkCore/MyProjectNameDbContextModelCreatingExtensions.cs index 719d8f2c1e..f345d756db 100644 --- a/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/EntityFrameworkCore/MyProjectNameDbContextModelCreatingExtensions.cs +++ b/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/EntityFrameworkCore/MyProjectNameDbContextModelCreatingExtensions.cs @@ -1,5 +1,9 @@ using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Metadata.Builders; +using MyCompanyName.MyProjectName.Users; using Volo.Abp; +using Volo.Abp.Identity; +using Volo.Abp.Users; namespace MyCompanyName.MyProjectName.EntityFrameworkCore { @@ -12,23 +16,18 @@ namespace MyCompanyName.MyProjectName.EntityFrameworkCore var tablePrefix = MyProjectNameConsts.DefaultDbTablePrefix; var schema = MyProjectNameConsts.DefaultDbSchema; - /* Configure all entities here. Example: + //builder.Entity(b => + //{ + // b.ToTable(tablePrefix + "YourEntities", schema); - builder.Entity(b => - { - //Configure table & schema name - //b.ToTable(tablePrefix + "Questions", schema); - - //Properties - //b.Property(q => q.Title).IsRequired().HasMaxLength(QuestionConsts.MaxTitleLength); - - //Configure relations - //b.HasMany(question => question.Tags).WithOne().HasForeignKey(qt => qt.QuestionId); + // //... + //}); + } - //Configure indexes - //b.HasIndex(q => q.CreationTime); - }); - */ + public static void ConfigureCustomUserProperties(this EntityTypeBuilder b) + where TUser: class, IUser + { + //b.Property(nameof(AppUser.MyProperty))... } } } \ No newline at end of file diff --git a/templates/mvc/src/MyCompanyName.MyProjectName.MongoDB/MongoDb/MyProjectNameMongoDbContext.cs b/templates/mvc/src/MyCompanyName.MyProjectName.MongoDB/MongoDb/MyProjectNameMongoDbContext.cs index 19c21ca038..95a041809f 100644 --- a/templates/mvc/src/MyCompanyName.MyProjectName.MongoDB/MongoDb/MyProjectNameMongoDbContext.cs +++ b/templates/mvc/src/MyCompanyName.MyProjectName.MongoDB/MongoDb/MyProjectNameMongoDbContext.cs @@ -1,4 +1,6 @@ -using Volo.Abp.Data; +using MongoDB.Driver; +using MyCompanyName.MyProjectName.Users; +using Volo.Abp.Data; using Volo.Abp.MongoDB; namespace MyCompanyName.MyProjectName.MongoDb @@ -6,6 +8,16 @@ namespace MyCompanyName.MyProjectName.MongoDb [ConnectionStringName("Default")] public class MyProjectNameMongoDbContext : AbpMongoDbContext { - + public IMongoCollection Users => Collection(); + + protected override void CreateModel(IMongoModelBuilder modelBuilder) + { + base.CreateModel(modelBuilder); + + modelBuilder.Entity(b => + { + b.CollectionName = "AbpUsers"; //Sharing the same collection "AbpUsers" with the IdentityUser + }); + } } } diff --git a/templates/mvc/test/MyCompanyName.MyProjectName.Application.Tests/MyCompanyName.MyProjectName.Application.Tests.csproj b/templates/mvc/test/MyCompanyName.MyProjectName.Application.Tests/MyCompanyName.MyProjectName.Application.Tests.csproj index e9b614f5e8..808ee9f1fe 100644 --- a/templates/mvc/test/MyCompanyName.MyProjectName.Application.Tests/MyCompanyName.MyProjectName.Application.Tests.csproj +++ b/templates/mvc/test/MyCompanyName.MyProjectName.Application.Tests/MyCompanyName.MyProjectName.Application.Tests.csproj @@ -9,9 +9,9 @@ - + diff --git a/templates/mvc/test/MyCompanyName.MyProjectName.Application.Tests/MyProjectNameApplicationTestModule.cs b/templates/mvc/test/MyCompanyName.MyProjectName.Application.Tests/MyProjectNameApplicationTestModule.cs index 145710c15b..d44dc0bb5a 100644 --- a/templates/mvc/test/MyCompanyName.MyProjectName.Application.Tests/MyProjectNameApplicationTestModule.cs +++ b/templates/mvc/test/MyCompanyName.MyProjectName.Application.Tests/MyProjectNameApplicationTestModule.cs @@ -53,11 +53,11 @@ namespace MyCompanyName.MyProjectName var connection = new SqliteConnection("Data Source=:memory:"); connection.Open(); - var options = new DbContextOptionsBuilder() + var options = new DbContextOptionsBuilder() .UseSqlite(connection) .Options; - using (var context = new MyProjectNameDbContext(options)) + using (var context = new MyProjectNameMigrationsDbContext(options)) { context.GetService().CreateTables(); } diff --git a/templates/mvc/test/MyCompanyName.MyProjectName.Application.Tests/Samples/SampleTest.cs b/templates/mvc/test/MyCompanyName.MyProjectName.Application.Tests/Samples/SampleTest.cs deleted file mode 100644 index e0f87e86c8..0000000000 --- a/templates/mvc/test/MyCompanyName.MyProjectName.Application.Tests/Samples/SampleTest.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System.Threading.Tasks; -using Microsoft.Extensions.DependencyInjection; -using Shouldly; -using Volo.Abp.Identity; -using Xunit; - -namespace MyCompanyName.MyProjectName.Samples -{ - public class SampleTest : MyProjectNameApplicationTestBase - { - private readonly IIdentityUserAppService _userAppService; - - public SampleTest() - { - _userAppService = ServiceProvider.GetRequiredService(); - } - - [Fact] - public async Task Initial_Data_Should_Contain_Admin_User() - { - var result = await _userAppService.GetListAsync(new GetIdentityUsersInput()); - result.TotalCount.ShouldBeGreaterThan(0); - result.Items.ShouldContain(u => u.UserName == "admin"); - } - } -} diff --git a/templates/mvc/test/MyCompanyName.MyProjectName.Application.Tests/Samples/SampleTests.cs b/templates/mvc/test/MyCompanyName.MyProjectName.Application.Tests/Samples/SampleTests.cs new file mode 100644 index 0000000000..3baff2826f --- /dev/null +++ b/templates/mvc/test/MyCompanyName.MyProjectName.Application.Tests/Samples/SampleTests.cs @@ -0,0 +1,59 @@ +using System; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.DependencyInjection; +using MyCompanyName.MyProjectName.Users; +using Shouldly; +using Volo.Abp.Domain.Repositories; +using Volo.Abp.Identity; +using Volo.Abp.Uow; +using Xunit; + +namespace MyCompanyName.MyProjectName.Samples +{ + public class SampleTests : MyProjectNameApplicationTestBase + { + private readonly IIdentityUserAppService _userAppService; + private readonly IRepository _appUserRepository; + private readonly IUnitOfWorkManager _unitOfWorkManager; + + public SampleTests() + { + _userAppService = ServiceProvider.GetRequiredService(); + _appUserRepository = ServiceProvider.GetRequiredService>(); + _unitOfWorkManager = ServiceProvider.GetRequiredService(); + } + + [Fact] + public async Task Initial_Data_Should_Contain_Admin_User() + { + //Act + var result = await _userAppService.GetListAsync(new GetIdentityUsersInput()); + + //Assert + result.TotalCount.ShouldBeGreaterThan(0); + result.Items.ShouldContain(u => u.UserName == "admin"); + } + + [Fact] + public async Task Should_Query_AppUser() + { + /* Need to manually start Unit Of Work because + * FirstOrDefaultAsync should be executed while db connection / context is available. + */ + using (var uow = _unitOfWorkManager.Begin()) + { + //Act + var adminUser = await _appUserRepository + .Where(u => u.UserName == "admin") + .FirstOrDefaultAsync(); + + //Assert + adminUser.ShouldNotBeNull(); + + await uow.CompleteAsync(); + } + } + } +} From 7e00a1461dbd8555c2ea0ae2dc7399b905bec367 Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Wed, 20 Mar 2019 13:42:21 +0300 Subject: [PATCH 03/20] Clean unused namespaces --- .../MyProjectNameDomainModule.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/templates/mvc/src/MyCompanyName.MyProjectName.Domain/MyProjectNameDomainModule.cs b/templates/mvc/src/MyCompanyName.MyProjectName.Domain/MyProjectNameDomainModule.cs index 565e4f8d5f..5fca840175 100644 --- a/templates/mvc/src/MyCompanyName.MyProjectName.Domain/MyProjectNameDomainModule.cs +++ b/templates/mvc/src/MyCompanyName.MyProjectName.Domain/MyProjectNameDomainModule.cs @@ -1,5 +1,4 @@ using MyCompanyName.MyProjectName.Localization.MyProjectName; -using MyCompanyName.MyProjectName.Settings; using Volo.Abp.Auditing; using Volo.Abp.AuditLogging; using Volo.Abp.BackgroundJobs; @@ -8,7 +7,6 @@ using Volo.Abp.Localization; using Volo.Abp.Localization.Resources.AbpValidation; using Volo.Abp.Modularity; using Volo.Abp.PermissionManagement.Identity; -using Volo.Abp.Settings; using Volo.Abp.VirtualFileSystem; namespace MyCompanyName.MyProjectName From 9b888c76868d497ea0f8711d63b1905a34de2e64 Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Wed, 20 Mar 2019 14:05:37 +0300 Subject: [PATCH 04/20] resolved #896 Responsive problem for abp.io download page --- abp_io/src/Volo.AbpWebSite.Web/Pages/Templates.cshtml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/abp_io/src/Volo.AbpWebSite.Web/Pages/Templates.cshtml b/abp_io/src/Volo.AbpWebSite.Web/Pages/Templates.cshtml index d7bc5aa603..4643510c34 100644 --- a/abp_io/src/Volo.AbpWebSite.Web/Pages/Templates.cshtml +++ b/abp_io/src/Volo.AbpWebSite.Web/Pages/Templates.cshtml @@ -14,7 +14,7 @@ @using (Html.BeginForm(FormMethod.Post)) {
-
+

Create New Project @@ -64,7 +64,7 @@

-
+

The Startup Project

See the documentation to understand how to run the downloaded project.

From 294f00305d56075d1c0847ba252153db15f00382 Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Wed, 20 Mar 2019 14:11:09 +0300 Subject: [PATCH 05/20] Checked if identityUser is null in CheckPassword method of AbpAccountWebModule --- .../Areas/Account/Controllers/AccountController.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/account/src/Volo.Abp.Account.Web/Areas/Account/Controllers/AccountController.cs b/modules/account/src/Volo.Abp.Account.Web/Areas/Account/Controllers/AccountController.cs index 3992e15f49..700d52b3a9 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Areas/Account/Controllers/AccountController.cs +++ b/modules/account/src/Volo.Abp.Account.Web/Areas/Account/Controllers/AccountController.cs @@ -47,6 +47,12 @@ namespace Volo.Abp.Account.Web.Areas.Account.Controllers { ValidateLoginInfo(login); var identityUser = await _userManager.FindByNameAsync(login.UserNameOrEmailAddress); + + if (identityUser == null) + { + return new AbpLoginResult(LoginResultType.InvalidUserNameOrPassword); + } + return GetAbpLoginResult(await _signInManager.CheckPasswordSignInAsync(identityUser, login.Password, true)); } From f94f5c575bff7951bf6e4189336c1fa7dd73e59f Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Wed, 20 Mar 2019 14:29:02 +0300 Subject: [PATCH 06/20] Added comments to mvc template --- .../MyProjectNameConsts.cs | 4 ++-- .../EntityFrameworkCore/MyProjectNameDbContext.cs | 3 ++- .../MyProjectNameDbContextModelCreatingExtensions.cs | 7 ++----- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/templates/mvc/src/MyCompanyName.MyProjectName.Domain/MyProjectNameConsts.cs b/templates/mvc/src/MyCompanyName.MyProjectName.Domain/MyProjectNameConsts.cs index 86a322bb13..d939cfca9f 100644 --- a/templates/mvc/src/MyCompanyName.MyProjectName.Domain/MyProjectNameConsts.cs +++ b/templates/mvc/src/MyCompanyName.MyProjectName.Domain/MyProjectNameConsts.cs @@ -2,8 +2,8 @@ { public static class MyProjectNameConsts { - public const string DefaultDbTablePrefix = "App"; + public const string DbTablePrefix = "App"; - public const string DefaultDbSchema = null; + public const string DbSchema = null; } } diff --git a/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/EntityFrameworkCore/MyProjectNameDbContext.cs b/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/EntityFrameworkCore/MyProjectNameDbContext.cs index 5b40bb037a..b96691dcc7 100644 --- a/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/EntityFrameworkCore/MyProjectNameDbContext.cs +++ b/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/EntityFrameworkCore/MyProjectNameDbContext.cs @@ -22,7 +22,7 @@ namespace MyCompanyName.MyProjectName.EntityFrameworkCore { base.OnModelCreating(builder); - /* Configure your shared tables (with included modules) here */ + /* Configure the shared tables (with included modules) here */ builder.Entity(b => { @@ -33,6 +33,7 @@ namespace MyCompanyName.MyProjectName.EntityFrameworkCore b.ConfigureConcurrencyStamp(); b.ConfigureAbpUser(); + //Moved customization to a method so we can share it with the MyProjectNameMigrationsDbContext class b.ConfigureCustomUserProperties(); }); diff --git a/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/EntityFrameworkCore/MyProjectNameDbContextModelCreatingExtensions.cs b/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/EntityFrameworkCore/MyProjectNameDbContextModelCreatingExtensions.cs index f345d756db..49f4c45893 100644 --- a/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/EntityFrameworkCore/MyProjectNameDbContextModelCreatingExtensions.cs +++ b/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/EntityFrameworkCore/MyProjectNameDbContextModelCreatingExtensions.cs @@ -1,8 +1,6 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; -using MyCompanyName.MyProjectName.Users; using Volo.Abp; -using Volo.Abp.Identity; using Volo.Abp.Users; namespace MyCompanyName.MyProjectName.EntityFrameworkCore @@ -13,12 +11,11 @@ namespace MyCompanyName.MyProjectName.EntityFrameworkCore { Check.NotNull(builder, nameof(builder)); - var tablePrefix = MyProjectNameConsts.DefaultDbTablePrefix; - var schema = MyProjectNameConsts.DefaultDbSchema; + /* Configure your own tables/entities inside here */ //builder.Entity(b => //{ - // b.ToTable(tablePrefix + "YourEntities", schema); + // b.ToTable(MyProjectNameConsts.DbTablePrefix + "YourEntities", MyProjectNameConsts.DbSchema); // //... //}); From e64412a3e566bd781d9a8493fac04d8c7ac5b6ca Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Wed, 20 Mar 2019 14:53:48 +0300 Subject: [PATCH 07/20] Added scroll to right side of permission modal #894 --- .../PermissionManagementModal.cshtml | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Pages/AbpPermissionManagement/PermissionManagementModal.cshtml b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Pages/AbpPermissionManagement/PermissionManagementModal.cshtml index beb39387b8..d1081f2f84 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Pages/AbpPermissionManagement/PermissionManagementModal.cshtml +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Pages/AbpPermissionManagement/PermissionManagementModal.cshtml @@ -14,23 +14,24 @@ - + @for (var i = 0; i < Model.Groups.Count; i++) {

@Model.Groups[i].DisplayName


- - @for (var j = 0; j < Model.Groups[i].Permissions.Count; j++) - { - - - } +
+ @for (var j = 0; j < Model.Groups[i].Permissions.Count; j++) + { + + + } +
}
From 7ffff19a1d5a5e40b55e8a93c1c83841898c5f80 Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Wed, 20 Mar 2019 15:09:07 +0300 Subject: [PATCH 08/20] Update MyProjectNameDbContextModelCreatingExtensions.cs --- .../MyProjectNameDbContextModelCreatingExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/EntityFrameworkCore/MyProjectNameDbContextModelCreatingExtensions.cs b/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/EntityFrameworkCore/MyProjectNameDbContextModelCreatingExtensions.cs index 49f4c45893..3528ed5279 100644 --- a/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/EntityFrameworkCore/MyProjectNameDbContextModelCreatingExtensions.cs +++ b/templates/mvc/src/MyCompanyName.MyProjectName.EntityFrameworkCore/EntityFrameworkCore/MyProjectNameDbContextModelCreatingExtensions.cs @@ -24,7 +24,7 @@ namespace MyCompanyName.MyProjectName.EntityFrameworkCore public static void ConfigureCustomUserProperties(this EntityTypeBuilder b) where TUser: class, IUser { - //b.Property(nameof(AppUser.MyProperty))... + //b.Property(nameof(AppUser.MyProperty))... } } } \ No newline at end of file From f29a8445439dcffdabe99ccece39c1b3bb829076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atakan=20=C3=96zceviz?= Date: Wed, 20 Mar 2019 13:32:32 +0100 Subject: [PATCH 09/20] Cleanup k8s yml files. --- .../k8s/auth-server-deployment.yaml | 44 ++++++------ .../k8s/auth-server-service.yaml | 15 ++-- .../k8s/backend-admin-app-deployment.yaml | 44 ++++++------ .../backend-admin-app-gateway-deployment.yaml | 68 +++++++++--------- .../backend-admin-app-gateway-service.yaml | 15 ++-- .../k8s/backend-admin-app-service.yaml | 15 ++-- .../k8s/blogging-service-deployment.yaml | 56 +++++++-------- .../k8s/blogging-service-service.yaml | 15 ++-- .../k8s/dbdata-persistentvolumeclaim.yaml | 3 - .../MicroserviceDemo/k8s/expose-service.yaml | 12 +--- .../k8s/identity-service-deployment.yaml | 48 ++++++------- .../k8s/identity-service-service.yaml | 15 ++-- .../k8s/internal-gateway-deployment.yaml | 72 +++++++++---------- .../k8s/internal-gateway-service.yaml | 15 ++-- .../k8s/mongodb-deployment.yaml | 21 +++--- .../MicroserviceDemo/k8s/mongodb-service.yaml | 12 ++-- .../k8s/product-service-deployment.yaml | 54 +++++++------- .../k8s/product-service-service.yaml | 15 ++-- .../k8s/public-website-deployment.yaml | 44 ++++++------ .../public-website-gateway-deployment.yaml | 64 ++++++++--------- .../k8s/public-website-gateway-service.yaml | 15 ++-- .../k8s/public-website-service.yaml | 15 ++-- .../k8s/rabbitmq-deployment.yaml | 23 +++--- .../k8s/rabbitmq-service.yaml | 12 ++-- .../k8s/redis-deployment.yaml | 21 +++--- .../MicroserviceDemo/k8s/redis-service.yaml | 14 ++-- .../k8s/restore-database-job.yaml | 2 +- .../k8s/sqlserver-deployment.yaml | 34 ++++----- .../k8s/sqlserver-service.yaml | 15 ++-- 29 files changed, 360 insertions(+), 438 deletions(-) diff --git a/samples/MicroserviceDemo/k8s/auth-server-deployment.yaml b/samples/MicroserviceDemo/k8s/auth-server-deployment.yaml index 7ddbc30309..81a4b5c64d 100644 --- a/samples/MicroserviceDemo/k8s/auth-server-deployment.yaml +++ b/samples/MicroserviceDemo/k8s/auth-server-deployment.yaml @@ -1,33 +1,31 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: - labels: - io.kompose.service: auth-server name: auth-server spec: + selector: + matchLabels: + app: auth-server replicas: 1 - strategy: {} template: metadata: labels: - io.kompose.service: auth-server + app: auth-server spec: containers: - - env: - - name: ASPNETCORE_ENVIRONMENT - value: Development - - name: ASPNETCORE_URLS - value: http://0.0.0.0:51511 - - name: ConnectionStrings__Default - value: Server=sqlserver;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false - - name: RabbitMQ__Connections__Default__HostName - value: rabbitmq - - name: Redis__Configuration - value: redis - image: volosoft/microservice-demo-auth-server - name: auth-server - ports: - - containerPort: 51511 - resources: {} - restartPolicy: Always -status: {} + - name: auth-server + image: "volosoft/microservice-demo-auth-server" + env: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: ASPNETCORE_URLS + value: http://0.0.0.0:51511 + - name: ConnectionStrings__Default + value: Server=sqlserver;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - name: RabbitMQ__Connections__Default__HostName + value: rabbitmq + - name: Redis__Configuration + value: redis + ports: + - name: http + containerPort: 51511 \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/auth-server-service.yaml b/samples/MicroserviceDemo/k8s/auth-server-service.yaml index d317ba1fae..1ff487ac16 100644 --- a/samples/MicroserviceDemo/k8s/auth-server-service.yaml +++ b/samples/MicroserviceDemo/k8s/auth-server-service.yaml @@ -1,14 +1,11 @@ -apiVersion: v1 kind: Service +apiVersion: v1 metadata: - labels: - io.kompose.service: auth-server name: auth-server spec: - ports: - - port: 51511 - targetPort: 51511 selector: - io.kompose.service: auth-server -status: - loadBalancer: {} + app: auth-server + ports: + - protocol: TCP + port: 51511 + targetPort: http \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/backend-admin-app-deployment.yaml b/samples/MicroserviceDemo/k8s/backend-admin-app-deployment.yaml index f26cb02806..4f0f3d4602 100644 --- a/samples/MicroserviceDemo/k8s/backend-admin-app-deployment.yaml +++ b/samples/MicroserviceDemo/k8s/backend-admin-app-deployment.yaml @@ -1,33 +1,31 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: - labels: - io.kompose.service: backend-admin-app name: backend-admin-app spec: + selector: + matchLabels: + app: backend-admin-app replicas: 1 - strategy: {} template: metadata: labels: - io.kompose.service: backend-admin-app + app: backend-admin-app spec: containers: - - env: - - name: ASPNETCORE_ENVIRONMENT - value: Development - - name: ASPNETCORE_URLS - value: http://0.0.0.0:80 - - name: AuthServer__Authority - value: http://auth-server:51511 - - name: Redis__Configuration - value: redis - - name: RemoteServices__Default__BaseUrl - value: http://backend-admin-app-gateway/ - image: volosoft/microservice-demo-backend-admin-app - name: backend-admin-app - ports: - - containerPort: 80 - resources: {} - restartPolicy: Always -status: {} + - name: backend-admin-app + image: "volosoft/microservice-demo-backend-admin-app" + env: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: ASPNETCORE_URLS + value: http://0.0.0.0:80 + - name: AuthServer__Authority + value: http://auth-server:51511 + - name: Redis__Configuration + value: redis + - name: RemoteServices__Default__BaseUrl + value: http://backend-admin-app-gateway/ + ports: + - name: http + containerPort: 80 \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/backend-admin-app-gateway-deployment.yaml b/samples/MicroserviceDemo/k8s/backend-admin-app-gateway-deployment.yaml index c2f28623b2..21d4260a98 100644 --- a/samples/MicroserviceDemo/k8s/backend-admin-app-gateway-deployment.yaml +++ b/samples/MicroserviceDemo/k8s/backend-admin-app-gateway-deployment.yaml @@ -1,45 +1,43 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: - labels: - io.kompose.service: backend-admin-app-gateway name: backend-admin-app-gateway spec: + selector: + matchLabels: + app: backend-admin-app-gateway replicas: 1 - strategy: {} template: metadata: labels: - io.kompose.service: backend-admin-app-gateway + app: backend-admin-app-gateway spec: containers: - - env: - - name: ASPNETCORE_ENVIRONMENT - value: Development - - name: ASPNETCORE_URLS - value: http://0.0.0.0:80 - - name: AuthServer__Authority - value: http://auth-server:51511 - - name: ConnectionStrings__Default - value: Server=sqlserver;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false - - name: GlobalConfiguration__BaseUrl - value: http://backend-admin-app-gateway - - name: ReRoutes__0__DownstreamHostAndPorts__0__Host - value: identity-service - - name: ReRoutes__0__DownstreamHostAndPorts__0__Port - value: "80" - - name: ReRoutes__1__DownstreamHostAndPorts__0__Host - value: product-service - - name: ReRoutes__1__DownstreamHostAndPorts__0__Port - value: "80" - - name: Redis__Configuration - value: redis - - name: RemoteServices__Default__BaseUrl - value: http://backend-admin-app-gateway/ - image: volosoft/microservice-demo-backend-admin-app-gateway - name: backend-admin-app-gateway - ports: - - containerPort: 80 - resources: {} - restartPolicy: Always -status: {} + - name: backend-admin-app-gateway + image: "volosoft/microservice-demo-backend-admin-app-gateway" + env: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: ASPNETCORE_URLS + value: http://0.0.0.0:80 + - name: AuthServer__Authority + value: http://auth-server:51511 + - name: ConnectionStrings__Default + value: Server=sqlserver;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - name: GlobalConfiguration__BaseUrl + value: http://backend-admin-app-gateway + - name: ReRoutes__0__DownstreamHostAndPorts__0__Host + value: identity-service + - name: ReRoutes__0__DownstreamHostAndPorts__0__Port + value: "80" + - name: ReRoutes__1__DownstreamHostAndPorts__0__Host + value: product-service + - name: ReRoutes__1__DownstreamHostAndPorts__0__Port + value: "80" + - name: Redis__Configuration + value: redis + - name: RemoteServices__Default__BaseUrl + value: http://backend-admin-app-gateway/ + ports: + - name: http + containerPort: 80 \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/backend-admin-app-gateway-service.yaml b/samples/MicroserviceDemo/k8s/backend-admin-app-gateway-service.yaml index 4864ee547a..d773c940d2 100644 --- a/samples/MicroserviceDemo/k8s/backend-admin-app-gateway-service.yaml +++ b/samples/MicroserviceDemo/k8s/backend-admin-app-gateway-service.yaml @@ -1,14 +1,11 @@ -apiVersion: v1 kind: Service +apiVersion: v1 metadata: - labels: - io.kompose.service: backend-admin-app-gateway name: backend-admin-app-gateway spec: - ports: - - port: 80 - targetPort: 80 selector: - io.kompose.service: backend-admin-app-gateway -status: - loadBalancer: {} + app: backend-admin-app-gateway + ports: + - protocol: TCP + port: 80 + targetPort: http \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/backend-admin-app-service.yaml b/samples/MicroserviceDemo/k8s/backend-admin-app-service.yaml index f8df4e57de..36a28cb7a1 100644 --- a/samples/MicroserviceDemo/k8s/backend-admin-app-service.yaml +++ b/samples/MicroserviceDemo/k8s/backend-admin-app-service.yaml @@ -1,14 +1,11 @@ -apiVersion: v1 kind: Service +apiVersion: v1 metadata: - labels: - io.kompose.service: backend-admin-app name: backend-admin-app spec: - ports: - - port: 80 - targetPort: 80 selector: - io.kompose.service: backend-admin-app -status: - loadBalancer: {} + app: backend-admin-app + ports: + - protocol: TCP + port: 80 + targetPort: http \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/blogging-service-deployment.yaml b/samples/MicroserviceDemo/k8s/blogging-service-deployment.yaml index 6bf8d33a8c..5fa5c5542d 100644 --- a/samples/MicroserviceDemo/k8s/blogging-service-deployment.yaml +++ b/samples/MicroserviceDemo/k8s/blogging-service-deployment.yaml @@ -1,39 +1,37 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: - labels: - io.kompose.service: blogging-service name: blogging-service spec: + selector: + matchLabels: + app: blogging-service replicas: 1 - strategy: {} template: metadata: labels: - io.kompose.service: blogging-service + app: blogging-service spec: containers: - - env: - - name: ASPNETCORE_ENVIRONMENT - value: Development - - name: ASPNETCORE_URLS - value: http://0.0.0.0:80 - - name: AuthServer__Authority - value: http://auth-server:51511 - - name: ConnectionStrings__Blogging - value: mongodb://mongodb|MsDemo_Blogging - - name: ConnectionStrings__Default - value: Server=sqlserver;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false - - name: RabbitMQ__Connections__Default__HostName - value: rabbitmq - - name: Redis__Configuration - value: redis - - name: RemoteServices__Default__BaseUrl - value: http://internal-gateway/ - image: volosoft/microservice-demo-blogging-service - name: blogging-service - ports: - - containerPort: 80 - resources: {} - restartPolicy: Always -status: {} + - name: blogging-service + image: "volosoft/microservice-demo-blogging-service" + env: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: ASPNETCORE_URLS + value: http://0.0.0.0:80 + - name: AuthServer__Authority + value: http://auth-server:51511 + - name: ConnectionStrings__Blogging + value: mongodb://mongodb|MsDemo_Blogging + - name: ConnectionStrings__Default + value: Server=sqlserver;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - name: RabbitMQ__Connections__Default__HostName + value: rabbitmq + - name: Redis__Configuration + value: redis + - name: RemoteServices__Default__BaseUrl + value: http://internal-gateway/ + ports: + - name: http + containerPort: 80 \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/blogging-service-service.yaml b/samples/MicroserviceDemo/k8s/blogging-service-service.yaml index c2b359580a..4e756c01d7 100644 --- a/samples/MicroserviceDemo/k8s/blogging-service-service.yaml +++ b/samples/MicroserviceDemo/k8s/blogging-service-service.yaml @@ -1,14 +1,11 @@ -apiVersion: v1 kind: Service +apiVersion: v1 metadata: - labels: - io.kompose.service: blogging-service name: blogging-service spec: - ports: - - port: 80 - targetPort: 80 selector: - io.kompose.service: blogging-service -status: - loadBalancer: {} + app: blogging-service + ports: + - protocol: TCP + port: 80 + targetPort: http \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/dbdata-persistentvolumeclaim.yaml b/samples/MicroserviceDemo/k8s/dbdata-persistentvolumeclaim.yaml index cfed8b93e2..6ba0609fb4 100644 --- a/samples/MicroserviceDemo/k8s/dbdata-persistentvolumeclaim.yaml +++ b/samples/MicroserviceDemo/k8s/dbdata-persistentvolumeclaim.yaml @@ -1,8 +1,6 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: - labels: - io.kompose.service: dbdata name: dbdata spec: accessModes: @@ -10,4 +8,3 @@ spec: resources: requests: storage: 500Mi -status: {} diff --git a/samples/MicroserviceDemo/k8s/expose-service.yaml b/samples/MicroserviceDemo/k8s/expose-service.yaml index f7a7e7dfe5..b1b668a533 100644 --- a/samples/MicroserviceDemo/k8s/expose-service.yaml +++ b/samples/MicroserviceDemo/k8s/expose-service.yaml @@ -1,13 +1,11 @@ apiVersion: v1 kind: Service metadata: - labels: - io.kompose.service: auth-server name: auth-server-expose spec: type: LoadBalancer selector: - io.kompose.service: auth-server + app: auth-server ports: - protocol: TCP port: 51511 @@ -17,13 +15,11 @@ spec: apiVersion: v1 kind: Service metadata: - labels: - io.kompose.service: backend-admin-app name: backend-admin-app-expose spec: type: LoadBalancer selector: - io.kompose.service: backend-admin-app + app: backend-admin-app ports: - protocol: TCP port: 80 @@ -33,13 +29,11 @@ spec: apiVersion: v1 kind: Service metadata: - labels: - io.kompose.service: public-website name: public-website-expose spec: type: LoadBalancer selector: - io.kompose.service: public-website + app: public-website ports: - protocol: TCP port: 80 diff --git a/samples/MicroserviceDemo/k8s/identity-service-deployment.yaml b/samples/MicroserviceDemo/k8s/identity-service-deployment.yaml index 6179f57e44..add7d662c3 100644 --- a/samples/MicroserviceDemo/k8s/identity-service-deployment.yaml +++ b/samples/MicroserviceDemo/k8s/identity-service-deployment.yaml @@ -1,35 +1,33 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: - labels: - io.kompose.service: identity-service name: identity-service spec: + selector: + matchLabels: + app: identity-service replicas: 1 - strategy: {} template: metadata: labels: - io.kompose.service: identity-service + app: identity-service spec: containers: - - env: - - name: ASPNETCORE_ENVIRONMENT - value: Development - - name: ASPNETCORE_URLS - value: http://0.0.0.0:80 - - name: AuthServer__Authority - value: http://auth-server:51511 - - name: ConnectionStrings__Default - value: Server=sqlserver;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false - - name: RabbitMQ__Connections__Default__HostName - value: rabbitmq - - name: Redis__Configuration - value: redis - image: volosoft/microservice-demo-identity-service - name: identity-service - ports: - - containerPort: 80 - resources: {} - restartPolicy: Always -status: {} + - name: identity-service + image: "volosoft/microservice-demo-identity-service" + env: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: ASPNETCORE_URLS + value: http://0.0.0.0:80 + - name: AuthServer__Authority + value: http://auth-server:51511 + - name: ConnectionStrings__Default + value: Server=sqlserver;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - name: RabbitMQ__Connections__Default__HostName + value: rabbitmq + - name: Redis__Configuration + value: redis + ports: + - name: http + containerPort: 80 \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/identity-service-service.yaml b/samples/MicroserviceDemo/k8s/identity-service-service.yaml index 994f120b0b..6157e27437 100644 --- a/samples/MicroserviceDemo/k8s/identity-service-service.yaml +++ b/samples/MicroserviceDemo/k8s/identity-service-service.yaml @@ -1,14 +1,11 @@ -apiVersion: v1 kind: Service +apiVersion: v1 metadata: - labels: - io.kompose.service: identity-service name: identity-service spec: - ports: - - port: 80 - targetPort: 80 selector: - io.kompose.service: identity-service -status: - loadBalancer: {} + app: identity-service + ports: + - protocol: TCP + port: 80 + targetPort: http \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/internal-gateway-deployment.yaml b/samples/MicroserviceDemo/k8s/internal-gateway-deployment.yaml index 9c7edf6cdb..e748456a64 100644 --- a/samples/MicroserviceDemo/k8s/internal-gateway-deployment.yaml +++ b/samples/MicroserviceDemo/k8s/internal-gateway-deployment.yaml @@ -1,47 +1,45 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: - labels: - io.kompose.service: internal-gateway name: internal-gateway spec: + selector: + matchLabels: + app: internal-gateway replicas: 1 - strategy: {} template: metadata: labels: - io.kompose.service: internal-gateway + app: internal-gateway spec: containers: - - env: - - name: ASPNETCORE_ENVIRONMENT - value: Development - - name: ASPNETCORE_URLS - value: http://0.0.0.0:80 - - name: AuthServer__Authority - value: http://auth-server:51511 - - name: ConnectionStrings__Default - value: Server=sqlserver;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false - - name: GlobalConfiguration__BaseUrl - value: http://internal-gateway - - name: ReRoutes__0__DownstreamHostAndPorts__0__Host - value: identity-service - - name: ReRoutes__0__DownstreamHostAndPorts__0__Port - value: "80" - - name: ReRoutes__1__DownstreamHostAndPorts__0__Host - value: product-service - - name: ReRoutes__1__DownstreamHostAndPorts__0__Port - value: "80" - - name: ReRoutes__2__DownstreamHostAndPorts__0__Host - value: blogging-service - - name: ReRoutes__2__DownstreamHostAndPorts__0__Port - value: "80" - - name: Redis__Configuration - value: redis - image: volosoft/microservice-demo-internal-gateway - name: internal-gateway - ports: - - containerPort: 80 - resources: {} - restartPolicy: Always -status: {} + - name: internal-gateway + image: "volosoft/microservice-demo-internal-gateway" + env: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: ASPNETCORE_URLS + value: http://0.0.0.0:80 + - name: AuthServer__Authority + value: http://auth-server:51511 + - name: ConnectionStrings__Default + value: Server=sqlserver;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - name: GlobalConfiguration__BaseUrl + value: http://internal-gateway + - name: ReRoutes__0__DownstreamHostAndPorts__0__Host + value: identity-service + - name: ReRoutes__0__DownstreamHostAndPorts__0__Port + value: "80" + - name: ReRoutes__1__DownstreamHostAndPorts__0__Host + value: product-service + - name: ReRoutes__1__DownstreamHostAndPorts__0__Port + value: "80" + - name: ReRoutes__2__DownstreamHostAndPorts__0__Host + value: blogging-service + - name: ReRoutes__2__DownstreamHostAndPorts__0__Port + value: "80" + - name: Redis__Configuration + value: redis + ports: + - name: http + containerPort: 80 \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/internal-gateway-service.yaml b/samples/MicroserviceDemo/k8s/internal-gateway-service.yaml index e2766c3c3a..b0d80b34a1 100644 --- a/samples/MicroserviceDemo/k8s/internal-gateway-service.yaml +++ b/samples/MicroserviceDemo/k8s/internal-gateway-service.yaml @@ -1,14 +1,11 @@ -apiVersion: v1 kind: Service +apiVersion: v1 metadata: - labels: - io.kompose.service: internal-gateway name: internal-gateway spec: - ports: - - port: 80 - targetPort: 80 selector: - io.kompose.service: internal-gateway -status: - loadBalancer: {} + app: internal-gateway + ports: + - protocol: TCP + port: 80 + targetPort: http \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/mongodb-deployment.yaml b/samples/MicroserviceDemo/k8s/mongodb-deployment.yaml index 938af49960..dbe3b9bde2 100644 --- a/samples/MicroserviceDemo/k8s/mongodb-deployment.yaml +++ b/samples/MicroserviceDemo/k8s/mongodb-deployment.yaml @@ -1,22 +1,19 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: - labels: - io.kompose.service: mongodb name: mongodb spec: + selector: + matchLabels: + app: mongodb replicas: 1 - strategy: {} template: metadata: labels: - io.kompose.service: mongodb + app: mongodb spec: containers: - - image: mongo - name: mongodb - ports: - - containerPort: 27017 - resources: {} - restartPolicy: Always -status: {} + - name: mongodb + image: "mongo" + ports: + - containerPort: 27017 \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/mongodb-service.yaml b/samples/MicroserviceDemo/k8s/mongodb-service.yaml index 34958fb121..0752ee87ca 100644 --- a/samples/MicroserviceDemo/k8s/mongodb-service.yaml +++ b/samples/MicroserviceDemo/k8s/mongodb-service.yaml @@ -1,14 +1,10 @@ -apiVersion: v1 kind: Service +apiVersion: v1 metadata: - labels: - io.kompose.service: mongodb name: mongodb spec: + selector: + app: mongodb ports: - port: 27017 - targetPort: 27017 - selector: - io.kompose.service: mongodb -status: - loadBalancer: {} + targetPort: 27017 \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/product-service-deployment.yaml b/samples/MicroserviceDemo/k8s/product-service-deployment.yaml index 669de15ae1..238c7ea45f 100644 --- a/samples/MicroserviceDemo/k8s/product-service-deployment.yaml +++ b/samples/MicroserviceDemo/k8s/product-service-deployment.yaml @@ -1,38 +1,36 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: - labels: - io.kompose.service: product-service name: product-service spec: + selector: + matchLabels: + app: product-service replicas: 1 - strategy: {} template: metadata: labels: - io.kompose.service: product-service + app: product-service spec: containers: - - env: - - name: ASPNETCORE_ENVIRONMENT - value: Development - - name: ASPNETCORE_URLS - value: http://0.0.0.0:80 - - name: AuthServer__Authority - value: http://auth-server:51511 - - name: ConnectionStrings__Default - value: Server=sqlserver;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated - Security=false - - name: ConnectionStrings__ProductManagement - value: Server=sqlserver;Database=MsDemo_ProductManagement;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false - - name: RabbitMQ__Connections__Default__HostName - value: rabbitmq - - name: Redis__Configuration - value: redis - image: volosoft/microservice-demo-product-service - name: product-service - ports: - - containerPort: 80 - resources: {} - restartPolicy: Always -status: {} + - name: product-service + image: "volosoft/microservice-demo-product-service" + env: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: ASPNETCORE_URLS + value: http://0.0.0.0:80 + - name: AuthServer__Authority + value: http://auth-server:51511 + - name: ConnectionStrings__Default + value: Server=sqlserver;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated + Security=false + - name: ConnectionStrings__ProductManagement + value: Server=sqlserver;Database=MsDemo_ProductManagement;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - name: RabbitMQ__Connections__Default__HostName + value: rabbitmq + - name: Redis__Configuration + value: redis + ports: + - name: http + containerPort: 80 \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/product-service-service.yaml b/samples/MicroserviceDemo/k8s/product-service-service.yaml index 3c5d1f333b..b420f35361 100644 --- a/samples/MicroserviceDemo/k8s/product-service-service.yaml +++ b/samples/MicroserviceDemo/k8s/product-service-service.yaml @@ -1,14 +1,11 @@ -apiVersion: v1 kind: Service +apiVersion: v1 metadata: - labels: - io.kompose.service: product-service name: product-service spec: - ports: - - port: 80 - targetPort: 80 selector: - io.kompose.service: product-service -status: - loadBalancer: {} + app: product-service + ports: + - protocol: TCP + port: 80 + targetPort: http \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/public-website-deployment.yaml b/samples/MicroserviceDemo/k8s/public-website-deployment.yaml index c643f68b99..321ad14565 100644 --- a/samples/MicroserviceDemo/k8s/public-website-deployment.yaml +++ b/samples/MicroserviceDemo/k8s/public-website-deployment.yaml @@ -1,33 +1,31 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: - labels: - io.kompose.service: public-website name: public-website spec: + selector: + matchLabels: + app: public-website replicas: 1 - strategy: {} template: metadata: labels: - io.kompose.service: public-website + app: public-website spec: containers: - - env: - - name: ASPNETCORE_ENVIRONMENT - value: Development - - name: ASPNETCORE_URLS - value: http://0.0.0.0:80 - - name: AuthServer__Authority - value: http://auth-server:51511 - - name: Redis__Configuration - value: redis - - name: RemoteServices__Default__BaseUrl - value: http://public-website-gateway/ - image: volosoft/microservice-demo-public-website - name: public-website - ports: - - containerPort: 80 - resources: {} - restartPolicy: Always -status: {} + - name: public-website + image: "volosoft/microservice-demo-public-website" + env: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: ASPNETCORE_URLS + value: http://0.0.0.0:80 + - name: AuthServer__Authority + value: http://auth-server:51511 + - name: Redis__Configuration + value: redis + - name: RemoteServices__Default__BaseUrl + value: http://public-website-gateway/ + ports: + - name: http + containerPort: 80 \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/public-website-gateway-deployment.yaml b/samples/MicroserviceDemo/k8s/public-website-gateway-deployment.yaml index 802f12a7e3..43804ea78a 100644 --- a/samples/MicroserviceDemo/k8s/public-website-gateway-deployment.yaml +++ b/samples/MicroserviceDemo/k8s/public-website-gateway-deployment.yaml @@ -1,43 +1,41 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: - labels: - io.kompose.service: public-website-gateway name: public-website-gateway spec: + selector: + matchLabels: + app: public-website-gateway replicas: 1 - strategy: {} template: metadata: labels: - io.kompose.service: public-website-gateway + app: public-website-gateway spec: containers: - - env: - - name: ASPNETCORE_ENVIRONMENT - value: Development - - name: ASPNETCORE_URLS - value: http://0.0.0.0:80 - - name: AuthServer__Authority - value: http://auth-server:51511 - - name: ConnectionStrings__Default - value: Server=sqlserver;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false - - name: GlobalConfiguration__BaseUrl - value: http://public-website-gateway - - name: ReRoutes__0__DownstreamHostAndPorts__0__Host - value: product-service - - name: ReRoutes__0__DownstreamHostAndPorts__0__Port - value: "80" - - name: ReRoutes__1__DownstreamHostAndPorts__0__Host - value: blogging-service - - name: ReRoutes__1__DownstreamHostAndPorts__0__Port - value: "80" - - name: Redis__Configuration - value: redis - image: volosoft/microservice-demo-public-website-gateway - name: public-website-gateway - ports: - - containerPort: 80 - resources: {} - restartPolicy: Always -status: {} + - name: public-website-gateway + image: "volosoft/microservice-demo-public-website-gateway" + env: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: ASPNETCORE_URLS + value: http://0.0.0.0:80 + - name: AuthServer__Authority + value: http://auth-server:51511 + - name: ConnectionStrings__Default + value: Server=sqlserver;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - name: GlobalConfiguration__BaseUrl + value: http://public-website-gateway + - name: ReRoutes__0__DownstreamHostAndPorts__0__Host + value: product-service + - name: ReRoutes__0__DownstreamHostAndPorts__0__Port + value: "80" + - name: ReRoutes__1__DownstreamHostAndPorts__0__Host + value: blogging-service + - name: ReRoutes__1__DownstreamHostAndPorts__0__Port + value: "80" + - name: Redis__Configuration + value: redis + ports: + - name: http + containerPort: 80 \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/public-website-gateway-service.yaml b/samples/MicroserviceDemo/k8s/public-website-gateway-service.yaml index 5ab4e428b9..d04c680685 100644 --- a/samples/MicroserviceDemo/k8s/public-website-gateway-service.yaml +++ b/samples/MicroserviceDemo/k8s/public-website-gateway-service.yaml @@ -1,14 +1,11 @@ -apiVersion: v1 kind: Service +apiVersion: v1 metadata: - labels: - io.kompose.service: public-website-gateway name: public-website-gateway spec: - ports: - - port: 80 - targetPort: 80 selector: - io.kompose.service: public-website-gateway -status: - loadBalancer: {} + app: public-website-gateway + ports: + - protocol: TCP + port: 80 + targetPort: http \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/public-website-service.yaml b/samples/MicroserviceDemo/k8s/public-website-service.yaml index 5f5c4f56d9..5ac586cb19 100644 --- a/samples/MicroserviceDemo/k8s/public-website-service.yaml +++ b/samples/MicroserviceDemo/k8s/public-website-service.yaml @@ -1,14 +1,11 @@ -apiVersion: v1 kind: Service +apiVersion: v1 metadata: - labels: - io.kompose.service: public-website name: public-website spec: - ports: - - port: 80 - targetPort: 80 selector: - io.kompose.service: public-website -status: - loadBalancer: {} + app: public-website + ports: + - protocol: TCP + port: 80 + targetPort: http \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/rabbitmq-deployment.yaml b/samples/MicroserviceDemo/k8s/rabbitmq-deployment.yaml index e455bebac6..283b1601a9 100644 --- a/samples/MicroserviceDemo/k8s/rabbitmq-deployment.yaml +++ b/samples/MicroserviceDemo/k8s/rabbitmq-deployment.yaml @@ -1,23 +1,20 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: - labels: - io.kompose.service: rabbitmq name: rabbitmq spec: + selector: + matchLabels: + app: rabbitmq replicas: 1 - strategy: {} template: metadata: labels: - io.kompose.service: rabbitmq + app: rabbitmq spec: containers: - - image: rabbitmq:3-management-alpine - name: rabbitmq - ports: - - containerPort: 5672 - - containerPort: 15672 - resources: {} - restartPolicy: Always -status: {} + - name: rabbitmq + image: "rabbitmq:3-management-alpine" + ports: + - containerPort: 5672 + - containerPort: 15672 \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/rabbitmq-service.yaml b/samples/MicroserviceDemo/k8s/rabbitmq-service.yaml index b8595193e8..07e7b2a618 100644 --- a/samples/MicroserviceDemo/k8s/rabbitmq-service.yaml +++ b/samples/MicroserviceDemo/k8s/rabbitmq-service.yaml @@ -1,18 +1,14 @@ -apiVersion: v1 kind: Service +apiVersion: v1 metadata: - labels: - io.kompose.service: rabbitmq name: rabbitmq spec: + selector: + app: rabbitmq ports: - name: "5672" port: 5672 targetPort: 5672 - name: "15672" port: 15672 - targetPort: 15672 - selector: - io.kompose.service: rabbitmq -status: - loadBalancer: {} + targetPort: 15672 \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/redis-deployment.yaml b/samples/MicroserviceDemo/k8s/redis-deployment.yaml index 35d9973110..5f0c6e50e4 100644 --- a/samples/MicroserviceDemo/k8s/redis-deployment.yaml +++ b/samples/MicroserviceDemo/k8s/redis-deployment.yaml @@ -1,22 +1,19 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: - labels: - io.kompose.service: redis name: redis spec: + selector: + matchLabels: + app: redis replicas: 1 - strategy: {} template: metadata: labels: - io.kompose.service: redis + app: redis spec: containers: - - image: redis - name: redis - ports: - - containerPort: 6379 - resources: {} - restartPolicy: Always -status: {} + - name: redis + image: "redis" + ports: + - containerPort: 6379 \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/redis-service.yaml b/samples/MicroserviceDemo/k8s/redis-service.yaml index 8ef5014d20..8fef057052 100644 --- a/samples/MicroserviceDemo/k8s/redis-service.yaml +++ b/samples/MicroserviceDemo/k8s/redis-service.yaml @@ -1,14 +1,10 @@ -apiVersion: v1 kind: Service +apiVersion: v1 metadata: - labels: - io.kompose.service: redis name: redis spec: - ports: - - port: 6379 - targetPort: 6379 selector: - io.kompose.service: redis -status: - loadBalancer: {} + app: redis + ports: + - port: 6379 + targetPort: 6379 \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/restore-database-job.yaml b/samples/MicroserviceDemo/k8s/restore-database-job.yaml index b35b67844f..fa403e95d8 100644 --- a/samples/MicroserviceDemo/k8s/restore-database-job.yaml +++ b/samples/MicroserviceDemo/k8s/restore-database-job.yaml @@ -12,7 +12,7 @@ spec: - name: SA_PASSWORD value: yourStrong(!)Password name: restore-database - image: volosoft/microservice-demo-restore-database + image: "volosoft/microservice-demo-restore-database" volumeMounts: - mountPath: /var/opt/mssql name: dbdata diff --git a/samples/MicroserviceDemo/k8s/sqlserver-deployment.yaml b/samples/MicroserviceDemo/k8s/sqlserver-deployment.yaml index 1de273530e..e95ce99ee7 100644 --- a/samples/MicroserviceDemo/k8s/sqlserver-deployment.yaml +++ b/samples/MicroserviceDemo/k8s/sqlserver-deployment.yaml @@ -1,35 +1,35 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: - labels: - io.kompose.service: sqlserver name: sqlserver spec: + selector: + matchLabels: + app: sqlserver replicas: 1 - strategy: - type: Recreate template: metadata: labels: - io.kompose.service: sqlserver + app: sqlserver spec: containers: - - env: + - name: sqlserver + image: mcr.microsoft.com/mssql/server + ports: + - containerPort: 1433 + env: + - name: MSSQL_PID + value: "Developer" - name: ACCEPT_EULA value: "Y" - name: SA_PASSWORD value: yourStrong(!)Password - image: mcr.microsoft.com/mssql/server - name: sqlserver - ports: - - containerPort: 1433 - resources: {} + - name: MSSQL_SA_PASSWORD + value: yourStrong(!)Password volumeMounts: - - mountPath: /var/opt/mssql - name: dbdata - restartPolicy: Always + - name: dbdata + mountPath: /var/opt/mssql volumes: - name: dbdata persistentVolumeClaim: - claimName: dbdata -status: {} + claimName: dbdata \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/sqlserver-service.yaml b/samples/MicroserviceDemo/k8s/sqlserver-service.yaml index da4a98c85a..a72adb2567 100644 --- a/samples/MicroserviceDemo/k8s/sqlserver-service.yaml +++ b/samples/MicroserviceDemo/k8s/sqlserver-service.yaml @@ -1,14 +1,11 @@ -apiVersion: v1 kind: Service +apiVersion: v1 metadata: - labels: - io.kompose.service: sqlserver name: sqlserver spec: - ports: - - port: 1433 - targetPort: 1433 selector: - io.kompose.service: sqlserver -status: - loadBalancer: {} + app: sqlserver + ports: + - protocol: TCP + port: 1433 + targetPort: 1433 \ No newline at end of file From 12f5572b78155128fb67c8b29fab578443460f90 Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Wed, 20 Mar 2019 15:52:47 +0300 Subject: [PATCH 10/20] Updated EF Core migrations --- ...Initial.Designer.cs => 20190320125012_Initial.Designer.cs} | 2 +- .../{20190107113413_Initial.cs => 20190320125012_Initial.cs} | 0 .../MyCompanyName.MyProjectName.DemoApp.csproj | 4 ++++ 3 files changed, 5 insertions(+), 1 deletion(-) rename templates/module/app/MyCompanyName.MyProjectName.DemoApp/Migrations/{20190107113413_Initial.Designer.cs => 20190320125012_Initial.Designer.cs} (99%) rename templates/module/app/MyCompanyName.MyProjectName.DemoApp/Migrations/{20190107113413_Initial.cs => 20190320125012_Initial.cs} (100%) diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/Migrations/20190107113413_Initial.Designer.cs b/templates/module/app/MyCompanyName.MyProjectName.DemoApp/Migrations/20190320125012_Initial.Designer.cs similarity index 99% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/Migrations/20190107113413_Initial.Designer.cs rename to templates/module/app/MyCompanyName.MyProjectName.DemoApp/Migrations/20190320125012_Initial.Designer.cs index 8d0c81b5f8..91a4c096ff 100644 --- a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/Migrations/20190107113413_Initial.Designer.cs +++ b/templates/module/app/MyCompanyName.MyProjectName.DemoApp/Migrations/20190320125012_Initial.Designer.cs @@ -10,7 +10,7 @@ using MyCompanyName.MyProjectName.DemoApp; namespace MyCompanyName.MyProjectName.DemoApp.Migrations { [DbContext(typeof(DemoAppDbContext))] - [Migration("20190107113413_Initial")] + [Migration("20190320125012_Initial")] partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/Migrations/20190107113413_Initial.cs b/templates/module/app/MyCompanyName.MyProjectName.DemoApp/Migrations/20190320125012_Initial.cs similarity index 100% rename from templates/module/app/MyCompanyName.MyProjectName.DemoApp/Migrations/20190107113413_Initial.cs rename to templates/module/app/MyCompanyName.MyProjectName.DemoApp/Migrations/20190320125012_Initial.cs diff --git a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/MyCompanyName.MyProjectName.DemoApp.csproj b/templates/module/app/MyCompanyName.MyProjectName.DemoApp/MyCompanyName.MyProjectName.DemoApp.csproj index 4e019c6d9b..041d6cf9ce 100644 --- a/templates/module/app/MyCompanyName.MyProjectName.DemoApp/MyCompanyName.MyProjectName.DemoApp.csproj +++ b/templates/module/app/MyCompanyName.MyProjectName.DemoApp/MyCompanyName.MyProjectName.DemoApp.csproj @@ -35,4 +35,8 @@ + + + + From 783dec9e28ba9b08cd1eecd2f1159ca597284ecd Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Wed, 20 Mar 2019 15:53:57 +0300 Subject: [PATCH 11/20] Remove asp-validation-summary --- .../Pages/Identity/Users/CreateModal.cshtml | 1 - .../Volo.Abp.Identity.Web/Pages/Identity/Users/EditModal.cshtml | 1 - 2 files changed, 2 deletions(-) diff --git a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/CreateModal.cshtml b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/CreateModal.cshtml index ed45747c0c..d20d0a0026 100644 --- a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/CreateModal.cshtml +++ b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/CreateModal.cshtml @@ -31,7 +31,6 @@ }
-
diff --git a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/EditModal.cshtml b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/EditModal.cshtml index be9cc9b205..247e59e46b 100644 --- a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/EditModal.cshtml +++ b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/EditModal.cshtml @@ -32,7 +32,6 @@ } -
From 956141e5f202ae674b12ec95c100575150d2a4c2 Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Wed, 20 Mar 2019 16:44:24 +0300 Subject: [PATCH 12/20] setting management localization --- .../AbpSettingManagementWebModule.cs | 15 ++++++++ .../AbpSettingManagementResource.cs | 10 +++++ .../Resources/AbpSettingManagement/en.json | 6 +++ .../Resources/AbpSettingManagement/tr.json | 6 +++ .../SettingManagementMainMenuContributor.cs | 7 ++-- .../Pages/SettingManagement/Index.cshtml | 37 ++++++++++--------- .../Volo.Abp.SettingManagement.Web.csproj | 2 +- 7 files changed, 62 insertions(+), 21 deletions(-) create mode 100644 modules/setting-management/src/Volo.Abp.SettingManagement.Web/Localization/AbpSettingManagementResource.cs create mode 100644 modules/setting-management/src/Volo.Abp.SettingManagement.Web/Localization/Resources/AbpSettingManagement/en.json create mode 100644 modules/setting-management/src/Volo.Abp.SettingManagement.Web/Localization/Resources/AbpSettingManagement/tr.json 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 b10d3c69c3..f1fae6b2f3 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/AbpSettingManagementWebModule.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/AbpSettingManagementWebModule.cs @@ -1,5 +1,7 @@ using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; +using Volo.Abp.Localization; using Volo.Abp.Modularity; +using Volo.Abp.SettingManagement.Localization; using Volo.Abp.SettingManagement.Web.Navigation; using Volo.Abp.UI.Navigation; using Volo.Abp.VirtualFileSystem; @@ -22,6 +24,19 @@ namespace Volo.Abp.SettingManagement.Web { options.FileSets.AddEmbedded("Volo.Abp.SettingManagement.Web"); }); + + Configure(options => + { + options.Resources + .Add("en"); + }); + + Configure(options => + { + options.Resources + .Get() + .AddVirtualJson("/Localization/Resources/AbpSettingManagement"); + }); } } } diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Localization/AbpSettingManagementResource.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Localization/AbpSettingManagementResource.cs new file mode 100644 index 0000000000..a89f749e4c --- /dev/null +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Localization/AbpSettingManagementResource.cs @@ -0,0 +1,10 @@ +using Volo.Abp.Localization; + +namespace Volo.Abp.SettingManagement.Localization +{ + [LocalizationResourceName("AbpSettingManagement")] + public class AbpSettingManagementResource + { + + } +} diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Localization/Resources/AbpSettingManagement/en.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Localization/Resources/AbpSettingManagement/en.json new file mode 100644 index 0000000000..654885f10b --- /dev/null +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Localization/Resources/AbpSettingManagement/en.json @@ -0,0 +1,6 @@ +{ + "culture": "en", + "texts": { + "Settings": "Settings" + } +} \ No newline at end of file diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Localization/Resources/AbpSettingManagement/tr.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Localization/Resources/AbpSettingManagement/tr.json new file mode 100644 index 0000000000..0e80027b84 --- /dev/null +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Localization/Resources/AbpSettingManagement/tr.json @@ -0,0 +1,6 @@ +{ + "culture": "tr", + "texts": { + "Settings": "Ayarlar" + } +} \ No newline at end of file diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Navigation/SettingManagementMainMenuContributor.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Navigation/SettingManagementMainMenuContributor.cs index 1fbd519bfd..79ed300398 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Navigation/SettingManagementMainMenuContributor.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Navigation/SettingManagementMainMenuContributor.cs @@ -1,7 +1,9 @@ using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Localization; using Microsoft.Extensions.Options; using System.Linq; using System.Threading.Tasks; +using Volo.Abp.SettingManagement.Localization; using Volo.Abp.SettingManagement.Web.Pages.SettingManagement; using Volo.Abp.UI.Navigation; @@ -22,15 +24,14 @@ namespace Volo.Abp.SettingManagement.Web.Navigation return Task.CompletedTask; } - //TODO: Localize - //var l = context.ServiceProvider.GetRequiredService>(); + var l = context.ServiceProvider.GetRequiredService>(); context.Menu .GetAdministration() .AddItem( new ApplicationMenuItem( SettingManagementMenuNames.GroupName, - "Settings", + l["Settings"], "/SettingManagement", icon: "fa fa-cog" ) diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Pages/SettingManagement/Index.cshtml b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Pages/SettingManagement/Index.cshtml index c14c416a36..edcc541bfe 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Pages/SettingManagement/Index.cshtml +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Pages/SettingManagement/Index.cshtml @@ -1,11 +1,14 @@ @page @using Volo.Abp.AspNetCore.Mvc.UI.Layout +@using Microsoft.AspNetCore.Mvc.Localization +@using Volo.Abp.SettingManagement.Localization @using Volo.Abp.SettingManagement.Web.Navigation @using Volo.Abp.SettingManagement.Web.Pages.SettingManagement @model IndexModel +@inject IHtmlLocalizer L @inject IPageLayout PageLayout @{ - PageLayout.Content.Title = /*L["Settings"].Value*/ "Settings"; + PageLayout.Content.Title = L["Settings"].Value; PageLayout.Content.MenuItemName = SettingManagementMenuNames.GroupName; } @section scripts { @@ -14,21 +17,21 @@ } -
- - +
+ + - - @foreach (var group in Model.SettingPageCreationContext.Groups) - { - + + @foreach (var group in Model.SettingPageCreationContext.Groups) + { + -

@group.DisplayName

-
- @await Component.InvokeAsync(group.ComponentType) -
- } -
-
-
-
\ No newline at end of file +

@group.DisplayName

+
+ @await Component.InvokeAsync(group.ComponentType) + + } + +
+
+
\ No newline at end of file diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Volo.Abp.SettingManagement.Web.csproj b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Volo.Abp.SettingManagement.Web.csproj index b4d9324a10..bef5707d83 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Volo.Abp.SettingManagement.Web.csproj +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Volo.Abp.SettingManagement.Web.csproj @@ -14,6 +14,7 @@ + @@ -25,7 +26,6 @@ - From b9c15f219ccb9531ee85bb81e85eeba74a8d1f8f Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Wed, 20 Mar 2019 17:02:41 +0300 Subject: [PATCH 13/20] Fix BloggingDbContextModelBuilderExtensions --- .../BloggingDbContextModelBuilderExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/EntityFrameworkCore/BloggingDbContextModelBuilderExtensions.cs b/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/EntityFrameworkCore/BloggingDbContextModelBuilderExtensions.cs index 7b7728c0f7..397739263a 100644 --- a/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/EntityFrameworkCore/BloggingDbContextModelBuilderExtensions.cs +++ b/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/EntityFrameworkCore/BloggingDbContextModelBuilderExtensions.cs @@ -27,7 +27,7 @@ namespace Volo.Blogging.EntityFrameworkCore { b.ToTable(options.TablePrefix + "Users", options.Schema); - b.ConfigureAbpUser(options); + b.ConfigureAbpUser(); b.ConfigureExtraProperties(); }); From 511718cfe7a4b275ff3815e1d42256d29bb43b02 Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Wed, 20 Mar 2019 17:29:09 +0300 Subject: [PATCH 14/20] Revised module references for the service template. Fixed #872. --- .../IdentityServerHost/DemoAppDbContext.cs | 6 + .../IdentityServerHost.csproj | 8 +- ....cs => 20190320142333_Initial.Designer.cs} | 299 +++++++++++++++++- ...1_Initial.cs => 20190320142333_Initial.cs} | 220 ++++++++++++- .../DemoAppDbContextModelSnapshot.cs | 297 ++++++++++++++++- .../host/IdentityServerHost/appsettings.json | 5 +- .../DemoAppDbContext.cs | 3 +- ....cs => 20190320142412_Initial.Designer.cs} | 2 +- ...9_Initial.cs => 20190320142412_Initial.cs} | 0 .../_CreateSqlServerCacheDatabase.bat | 2 +- .../appsettings.json | 9 +- 11 files changed, 791 insertions(+), 60 deletions(-) rename templates/service/host/IdentityServerHost/Migrations/{20190107114341_Initial.Designer.cs => 20190320142333_Initial.Designer.cs} (75%) rename templates/service/host/IdentityServerHost/Migrations/{20190107114341_Initial.cs => 20190320142333_Initial.cs} (77%) rename templates/service/host/MyCompanyName.MyProjectName.Host/Migrations/{20190214093219_Initial.Designer.cs => 20190320142412_Initial.Designer.cs} (99%) rename templates/service/host/MyCompanyName.MyProjectName.Host/Migrations/{20190214093219_Initial.cs => 20190320142412_Initial.cs} (100%) diff --git a/templates/service/host/IdentityServerHost/DemoAppDbContext.cs b/templates/service/host/IdentityServerHost/DemoAppDbContext.cs index 754cd89dff..5d418a19e0 100644 --- a/templates/service/host/IdentityServerHost/DemoAppDbContext.cs +++ b/templates/service/host/IdentityServerHost/DemoAppDbContext.cs @@ -1,7 +1,10 @@ using Microsoft.EntityFrameworkCore; +using Volo.Abp.AuditLogging.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore; using Volo.Abp.Identity.EntityFrameworkCore; using Volo.Abp.IdentityServer.EntityFrameworkCore; +using Volo.Abp.PermissionManagement.EntityFrameworkCore; +using Volo.Abp.SettingManagement.EntityFrameworkCore; namespace IdentityServerHost { @@ -17,6 +20,9 @@ namespace IdentityServerHost { base.OnModelCreating(modelBuilder); + modelBuilder.ConfigurePermissionManagement(); + modelBuilder.ConfigureSettingManagement(); + modelBuilder.ConfigureAuditLogging(); modelBuilder.ConfigureIdentity(); modelBuilder.ConfigureIdentityServer(); } diff --git a/templates/service/host/IdentityServerHost/IdentityServerHost.csproj b/templates/service/host/IdentityServerHost/IdentityServerHost.csproj index c5b8c3826d..7e72681de0 100644 --- a/templates/service/host/IdentityServerHost/IdentityServerHost.csproj +++ b/templates/service/host/IdentityServerHost/IdentityServerHost.csproj @@ -17,6 +17,9 @@ + + + @@ -26,9 +29,4 @@ - - - - - diff --git a/templates/service/host/IdentityServerHost/Migrations/20190107114341_Initial.Designer.cs b/templates/service/host/IdentityServerHost/Migrations/20190320142333_Initial.Designer.cs similarity index 75% rename from templates/service/host/IdentityServerHost/Migrations/20190107114341_Initial.Designer.cs rename to templates/service/host/IdentityServerHost/Migrations/20190320142333_Initial.Designer.cs index 1dd595dfd1..8ef18c7e12 100644 --- a/templates/service/host/IdentityServerHost/Migrations/20190107114341_Initial.Designer.cs +++ b/templates/service/host/IdentityServerHost/Migrations/20190320142333_Initial.Designer.cs @@ -10,7 +10,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; namespace IdentityServerHost.Migrations { [DbContext(typeof(DemoAppDbContext))] - [Migration("20190107114341_Initial")] + [Migration("20190320142333_Initial")] partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -21,6 +21,202 @@ namespace IdentityServerHost.Migrations .HasAnnotation("Relational:MaxIdentifierLength", 128) .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ApplicationName") + .HasColumnName("ApplicationName") + .HasMaxLength(96); + + b.Property("BrowserInfo") + .HasColumnName("BrowserInfo") + .HasMaxLength(512); + + b.Property("ClientId") + .HasColumnName("ClientId") + .HasMaxLength(64); + + b.Property("ClientIpAddress") + .HasColumnName("ClientIpAddress") + .HasMaxLength(64); + + b.Property("ClientName") + .HasColumnName("ClientName") + .HasMaxLength(128); + + b.Property("Comments") + .HasColumnName("Comments") + .HasMaxLength(256); + + b.Property("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasColumnName("CorrelationId") + .HasMaxLength(64); + + b.Property("Exceptions") + .HasColumnName("Exceptions") + .HasMaxLength(4000); + + b.Property("ExecutionDuration") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties"); + + b.Property("HttpMethod") + .HasColumnName("HttpMethod") + .HasMaxLength(16); + + b.Property("HttpStatusCode") + .HasColumnName("HttpStatusCode"); + + b.Property("ImpersonatorTenantId") + .HasColumnName("ImpersonatorTenantId"); + + b.Property("ImpersonatorUserId") + .HasColumnName("ImpersonatorUserId"); + + b.Property("TenantId") + .HasColumnName("TenantId"); + + b.Property("Url") + .HasColumnName("Url") + .HasMaxLength(256); + + b.Property("UserId") + .HasColumnName("UserId"); + + b.Property("UserName") + .HasColumnName("UserName") + .HasMaxLength(256); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ExecutionTime"); + + b.HasIndex("TenantId", "UserId", "ExecutionTime"); + + b.ToTable("AbpAuditLogs"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AuditLogId") + .HasColumnName("AuditLogId"); + + b.Property("ExecutionDuration") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnName("ExecutionTime"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties"); + + b.Property("MethodName") + .HasColumnName("MethodName") + .HasMaxLength(128); + + b.Property("Parameters") + .HasColumnName("Parameters") + .HasMaxLength(2000); + + b.Property("ServiceName") + .HasColumnName("ServiceName") + .HasMaxLength(256); + + b.Property("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); + + b.ToTable("AbpAuditLogActions"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AuditLogId") + .HasColumnName("AuditLogId"); + + b.Property("ChangeTime") + .HasColumnName("ChangeTime"); + + b.Property("ChangeType") + .HasColumnName("ChangeType"); + + b.Property("EntityId") + .IsRequired() + .HasColumnName("EntityId") + .HasMaxLength(128); + + b.Property("EntityTypeFullName") + .IsRequired() + .HasColumnName("EntityTypeFullName") + .HasMaxLength(128); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties"); + + b.Property("TenantId") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); + + b.ToTable("AbpEntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("EntityChangeId"); + + b.Property("NewValue") + .HasColumnName("NewValue") + .HasMaxLength(512); + + b.Property("OriginalValue") + .HasColumnName("OriginalValue") + .HasMaxLength(512); + + b.Property("PropertyName") + .IsRequired() + .HasColumnName("PropertyName") + .HasMaxLength(128); + + b.Property("PropertyTypeFullName") + .IsRequired() + .HasColumnName("PropertyTypeFullName") + .HasMaxLength(64); + + b.Property("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityChangeId"); + + b.ToTable("AbpEntityPropertyChanges"); + }); + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => { b.Property("Id") @@ -445,7 +641,7 @@ namespace IdentityServerHost.Migrations b.Property("BackChannelLogoutSessionRequired"); b.Property("BackChannelLogoutUri") - .HasMaxLength(2000); + .HasMaxLength(300); b.Property("ClientClaimsPrefix") .HasMaxLength(200); @@ -458,7 +654,7 @@ namespace IdentityServerHost.Migrations .HasMaxLength(200); b.Property("ClientUri") - .HasMaxLength(2000); + .HasMaxLength(300); b.Property("ConcurrencyStamp"); @@ -477,14 +673,14 @@ namespace IdentityServerHost.Migrations b.Property("FrontChannelLogoutSessionRequired"); b.Property("FrontChannelLogoutUri") - .HasMaxLength(2000); + .HasMaxLength(300); b.Property("IdentityTokenLifetime"); b.Property("IncludeJwtId"); b.Property("LogoUri") - .HasMaxLength(2000); + .HasMaxLength(300); b.Property("PairWiseSubjectSalt") .HasMaxLength(200); @@ -517,22 +713,15 @@ namespace IdentityServerHost.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => { - b.Property("Id") - .ValueGeneratedOnAdd(); - b.Property("ClientId"); b.Property("Type") - .IsRequired() .HasMaxLength(250); b.Property("Value") - .IsRequired() .HasMaxLength(250); - b.HasKey("Id"); - - b.HasIndex("ClientId"); + b.HasKey("ClientId", "Type", "Value"); b.ToTable("IdentityServerClientClaims"); }); @@ -578,7 +767,7 @@ namespace IdentityServerHost.Migrations b.Property("ClientId"); b.Property("PostLogoutRedirectUri") - .HasMaxLength(2000); + .HasMaxLength(200); b.HasKey("ClientId", "PostLogoutRedirectUri"); @@ -590,11 +779,11 @@ namespace IdentityServerHost.Migrations b.Property("ClientId"); b.Property("Key") - .HasMaxLength(250); + .HasMaxLength(64); b.Property("Value") .IsRequired() - .HasMaxLength(2000); + .HasMaxLength(128); b.HasKey("ClientId", "Key"); @@ -606,7 +795,7 @@ namespace IdentityServerHost.Migrations b.Property("ClientId"); b.Property("RedirectUri") - .HasMaxLength(2000); + .HasMaxLength(200); b.HasKey("ClientId", "RedirectUri"); @@ -727,6 +916,82 @@ namespace IdentityServerHost.Migrations b.ToTable("IdentityServerIdentityResources"); }); + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64); + + b.Property("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey"); + + b.ToTable("AbpPermissionGrants"); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128); + + b.Property("ProviderKey") + .HasMaxLength(64); + + b.Property("ProviderName") + .HasMaxLength(64); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey"); + + b.ToTable("AbpSettings"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog") + .WithMany("Actions") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog") + .WithMany("EntityChanges") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.EntityChange") + .WithMany("PropertyChanges") + .HasForeignKey("EntityChangeId") + .OnDelete(DeleteBehavior.Cascade); + }); + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => { b.HasOne("Volo.Abp.Identity.IdentityRole") diff --git a/templates/service/host/IdentityServerHost/Migrations/20190107114341_Initial.cs b/templates/service/host/IdentityServerHost/Migrations/20190320142333_Initial.cs similarity index 77% rename from templates/service/host/IdentityServerHost/Migrations/20190107114341_Initial.cs rename to templates/service/host/IdentityServerHost/Migrations/20190320142333_Initial.cs index ddb2f14c1c..88588fb970 100644 --- a/templates/service/host/IdentityServerHost/Migrations/20190107114341_Initial.cs +++ b/templates/service/host/IdentityServerHost/Migrations/20190320142333_Initial.cs @@ -7,6 +7,37 @@ namespace IdentityServerHost.Migrations { protected override void Up(MigrationBuilder migrationBuilder) { + migrationBuilder.CreateTable( + name: "AbpAuditLogs", + columns: table => new + { + Id = table.Column(nullable: false), + ExtraProperties = table.Column(nullable: true), + ConcurrencyStamp = table.Column(nullable: true), + ApplicationName = table.Column(maxLength: 96, nullable: true), + UserId = table.Column(nullable: true), + UserName = table.Column(maxLength: 256, nullable: true), + TenantId = table.Column(nullable: true), + ImpersonatorUserId = table.Column(nullable: true), + ImpersonatorTenantId = table.Column(nullable: true), + ExecutionTime = table.Column(nullable: false), + ExecutionDuration = table.Column(nullable: false), + ClientIpAddress = table.Column(maxLength: 64, nullable: true), + ClientName = table.Column(maxLength: 128, nullable: true), + ClientId = table.Column(maxLength: 64, nullable: true), + CorrelationId = table.Column(maxLength: 64, nullable: true), + BrowserInfo = table.Column(maxLength: 512, nullable: true), + HttpMethod = table.Column(maxLength: 16, nullable: true), + Url = table.Column(maxLength: 256, nullable: true), + Exceptions = table.Column(maxLength: 4000, nullable: true), + Comments = table.Column(maxLength: 256, nullable: true), + HttpStatusCode = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpAuditLogs", x => x.Id); + }); + migrationBuilder.CreateTable( name: "AbpClaimTypes", columns: table => new @@ -27,6 +58,21 @@ namespace IdentityServerHost.Migrations table.PrimaryKey("PK_AbpClaimTypes", x => x.Id); }); + migrationBuilder.CreateTable( + name: "AbpPermissionGrants", + columns: table => new + { + Id = table.Column(nullable: false), + TenantId = table.Column(nullable: true), + Name = table.Column(maxLength: 128, nullable: false), + ProviderName = table.Column(maxLength: 64, nullable: false), + ProviderKey = table.Column(maxLength: 64, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpPermissionGrants", x => x.Id); + }); + migrationBuilder.CreateTable( name: "AbpRoles", columns: table => new @@ -46,6 +92,21 @@ namespace IdentityServerHost.Migrations table.PrimaryKey("PK_AbpRoles", x => x.Id); }); + migrationBuilder.CreateTable( + name: "AbpSettings", + columns: table => new + { + Id = table.Column(nullable: false), + Name = table.Column(maxLength: 128, nullable: false), + Value = table.Column(maxLength: 2048, nullable: false), + ProviderName = table.Column(maxLength: 64, nullable: true), + ProviderKey = table.Column(maxLength: 64, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpSettings", x => x.Id); + }); + migrationBuilder.CreateTable( name: "AbpUsers", columns: table => new @@ -109,8 +170,8 @@ namespace IdentityServerHost.Migrations ClientId = table.Column(maxLength: 200, nullable: false), ClientName = table.Column(maxLength: 200, nullable: true), Description = table.Column(maxLength: 1000, nullable: true), - ClientUri = table.Column(maxLength: 2000, nullable: true), - LogoUri = table.Column(maxLength: 2000, nullable: true), + ClientUri = table.Column(maxLength: 300, nullable: true), + LogoUri = table.Column(maxLength: 300, nullable: true), Enabled = table.Column(nullable: false), ProtocolType = table.Column(maxLength: 200, nullable: false), RequireClientSecret = table.Column(nullable: false), @@ -120,9 +181,9 @@ namespace IdentityServerHost.Migrations RequirePkce = table.Column(nullable: false), AllowPlainTextPkce = table.Column(nullable: false), AllowAccessTokensViaBrowser = table.Column(nullable: false), - FrontChannelLogoutUri = table.Column(maxLength: 2000, nullable: true), + FrontChannelLogoutUri = table.Column(maxLength: 300, nullable: true), FrontChannelLogoutSessionRequired = table.Column(nullable: false), - BackChannelLogoutUri = table.Column(maxLength: 2000, nullable: true), + BackChannelLogoutUri = table.Column(maxLength: 300, nullable: true), BackChannelLogoutSessionRequired = table.Column(nullable: false), AllowOfflineAccess = table.Column(nullable: false), IdentityTokenLifetime = table.Column(nullable: false), @@ -186,6 +247,55 @@ namespace IdentityServerHost.Migrations table.PrimaryKey("PK_IdentityServerPersistedGrants", x => x.Key); }); + migrationBuilder.CreateTable( + name: "AbpAuditLogActions", + columns: table => new + { + Id = table.Column(nullable: false), + TenantId = table.Column(nullable: true), + AuditLogId = table.Column(nullable: false), + ServiceName = table.Column(maxLength: 256, nullable: true), + MethodName = table.Column(maxLength: 128, nullable: true), + Parameters = table.Column(maxLength: 2000, nullable: true), + ExecutionTime = table.Column(nullable: false), + ExecutionDuration = table.Column(nullable: false), + ExtraProperties = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpAuditLogActions", x => x.Id); + table.ForeignKey( + name: "FK_AbpAuditLogActions_AbpAuditLogs_AuditLogId", + column: x => x.AuditLogId, + principalTable: "AbpAuditLogs", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpEntityChanges", + columns: table => new + { + Id = table.Column(nullable: false), + AuditLogId = table.Column(nullable: false), + TenantId = table.Column(nullable: true), + ChangeTime = table.Column(nullable: false), + ChangeType = table.Column(nullable: false), + EntityId = table.Column(maxLength: 128, nullable: false), + EntityTypeFullName = table.Column(maxLength: 128, nullable: false), + ExtraProperties = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpEntityChanges", x => x.Id); + table.ForeignKey( + name: "FK_AbpEntityChanges_AbpAuditLogs_AuditLogId", + column: x => x.AuditLogId, + principalTable: "AbpAuditLogs", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( name: "AbpRoleClaims", columns: table => new @@ -361,14 +471,13 @@ namespace IdentityServerHost.Migrations name: "IdentityServerClientClaims", columns: table => new { - Id = table.Column(nullable: false), ClientId = table.Column(nullable: false), Type = table.Column(maxLength: 250, nullable: false), Value = table.Column(maxLength: 250, nullable: false) }, constraints: table => { - table.PrimaryKey("PK_IdentityServerClientClaims", x => x.Id); + table.PrimaryKey("PK_IdentityServerClientClaims", x => new { x.ClientId, x.Type, x.Value }); table.ForeignKey( name: "FK_IdentityServerClientClaims_IdentityServerClients_ClientId", column: x => x.ClientId, @@ -436,7 +545,7 @@ namespace IdentityServerHost.Migrations columns: table => new { ClientId = table.Column(nullable: false), - PostLogoutRedirectUri = table.Column(maxLength: 2000, nullable: false) + PostLogoutRedirectUri = table.Column(maxLength: 200, nullable: false) }, constraints: table => { @@ -454,8 +563,8 @@ namespace IdentityServerHost.Migrations columns: table => new { ClientId = table.Column(nullable: false), - Key = table.Column(maxLength: 250, nullable: false), - Value = table.Column(maxLength: 2000, nullable: false) + Key = table.Column(maxLength: 64, nullable: false), + Value = table.Column(maxLength: 128, nullable: false) }, constraints: table => { @@ -473,7 +582,7 @@ namespace IdentityServerHost.Migrations columns: table => new { ClientId = table.Column(nullable: false), - RedirectUri = table.Column(maxLength: 2000, nullable: false) + RedirectUri = table.Column(maxLength: 200, nullable: false) }, constraints: table => { @@ -543,6 +652,29 @@ namespace IdentityServerHost.Migrations onDelete: ReferentialAction.Cascade); }); + migrationBuilder.CreateTable( + name: "AbpEntityPropertyChanges", + columns: table => new + { + Id = table.Column(nullable: false), + TenantId = table.Column(nullable: true), + EntityChangeId = table.Column(nullable: false), + NewValue = table.Column(maxLength: 512, nullable: true), + OriginalValue = table.Column(maxLength: 512, nullable: true), + PropertyName = table.Column(maxLength: 128, nullable: false), + PropertyTypeFullName = table.Column(maxLength: 64, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpEntityPropertyChanges", x => x.Id); + table.ForeignKey( + name: "FK_AbpEntityPropertyChanges_AbpEntityChanges_EntityChangeId", + column: x => x.EntityChangeId, + principalTable: "AbpEntityChanges", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( name: "IdentityServerApiScopeClaims", columns: table => new @@ -562,6 +694,46 @@ namespace IdentityServerHost.Migrations onDelete: ReferentialAction.Cascade); }); + migrationBuilder.CreateIndex( + name: "IX_AbpAuditLogActions_AuditLogId", + table: "AbpAuditLogActions", + column: "AuditLogId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpAuditLogActions_TenantId_ServiceName_MethodName_ExecutionTime", + table: "AbpAuditLogActions", + columns: new[] { "TenantId", "ServiceName", "MethodName", "ExecutionTime" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpAuditLogs_TenantId_ExecutionTime", + table: "AbpAuditLogs", + columns: new[] { "TenantId", "ExecutionTime" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpAuditLogs_TenantId_UserId_ExecutionTime", + table: "AbpAuditLogs", + columns: new[] { "TenantId", "UserId", "ExecutionTime" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpEntityChanges_AuditLogId", + table: "AbpEntityChanges", + column: "AuditLogId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpEntityChanges_TenantId_EntityTypeFullName_EntityId", + table: "AbpEntityChanges", + columns: new[] { "TenantId", "EntityTypeFullName", "EntityId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpEntityPropertyChanges_EntityChangeId", + table: "AbpEntityPropertyChanges", + column: "EntityChangeId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpPermissionGrants_Name_ProviderName_ProviderKey", + table: "AbpPermissionGrants", + columns: new[] { "Name", "ProviderName", "ProviderKey" }); + migrationBuilder.CreateIndex( name: "IX_AbpRoleClaims_RoleId", table: "AbpRoleClaims", @@ -572,6 +744,11 @@ namespace IdentityServerHost.Migrations table: "AbpRoles", column: "NormalizedName"); + migrationBuilder.CreateIndex( + name: "IX_AbpSettings_Name_ProviderName_ProviderKey", + table: "AbpSettings", + columns: new[] { "Name", "ProviderName", "ProviderKey" }); + migrationBuilder.CreateIndex( name: "IX_AbpUserClaims_UserId", table: "AbpUserClaims", @@ -607,11 +784,6 @@ namespace IdentityServerHost.Migrations table: "AbpUsers", column: "UserName"); - migrationBuilder.CreateIndex( - name: "IX_IdentityServerClientClaims_ClientId", - table: "IdentityServerClientClaims", - column: "ClientId"); - migrationBuilder.CreateIndex( name: "IX_IdentityServerClients_ClientId", table: "IdentityServerClients", @@ -626,12 +798,24 @@ namespace IdentityServerHost.Migrations protected override void Down(MigrationBuilder migrationBuilder) { + migrationBuilder.DropTable( + name: "AbpAuditLogActions"); + migrationBuilder.DropTable( name: "AbpClaimTypes"); + migrationBuilder.DropTable( + name: "AbpEntityPropertyChanges"); + + migrationBuilder.DropTable( + name: "AbpPermissionGrants"); + migrationBuilder.DropTable( name: "AbpRoleClaims"); + migrationBuilder.DropTable( + name: "AbpSettings"); + migrationBuilder.DropTable( name: "AbpUserClaims"); @@ -686,6 +870,9 @@ namespace IdentityServerHost.Migrations migrationBuilder.DropTable( name: "IdentityServerPersistedGrants"); + migrationBuilder.DropTable( + name: "AbpEntityChanges"); + migrationBuilder.DropTable( name: "AbpRoles"); @@ -701,6 +888,9 @@ namespace IdentityServerHost.Migrations migrationBuilder.DropTable( name: "IdentityServerIdentityResources"); + migrationBuilder.DropTable( + name: "AbpAuditLogs"); + migrationBuilder.DropTable( name: "IdentityServerApiResources"); } diff --git a/templates/service/host/IdentityServerHost/Migrations/DemoAppDbContextModelSnapshot.cs b/templates/service/host/IdentityServerHost/Migrations/DemoAppDbContextModelSnapshot.cs index 2a102778ee..1aec48ea05 100644 --- a/templates/service/host/IdentityServerHost/Migrations/DemoAppDbContextModelSnapshot.cs +++ b/templates/service/host/IdentityServerHost/Migrations/DemoAppDbContextModelSnapshot.cs @@ -19,6 +19,202 @@ namespace IdentityServerHost.Migrations .HasAnnotation("Relational:MaxIdentifierLength", 128) .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ApplicationName") + .HasColumnName("ApplicationName") + .HasMaxLength(96); + + b.Property("BrowserInfo") + .HasColumnName("BrowserInfo") + .HasMaxLength(512); + + b.Property("ClientId") + .HasColumnName("ClientId") + .HasMaxLength(64); + + b.Property("ClientIpAddress") + .HasColumnName("ClientIpAddress") + .HasMaxLength(64); + + b.Property("ClientName") + .HasColumnName("ClientName") + .HasMaxLength(128); + + b.Property("Comments") + .HasColumnName("Comments") + .HasMaxLength(256); + + b.Property("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasColumnName("CorrelationId") + .HasMaxLength(64); + + b.Property("Exceptions") + .HasColumnName("Exceptions") + .HasMaxLength(4000); + + b.Property("ExecutionDuration") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties"); + + b.Property("HttpMethod") + .HasColumnName("HttpMethod") + .HasMaxLength(16); + + b.Property("HttpStatusCode") + .HasColumnName("HttpStatusCode"); + + b.Property("ImpersonatorTenantId") + .HasColumnName("ImpersonatorTenantId"); + + b.Property("ImpersonatorUserId") + .HasColumnName("ImpersonatorUserId"); + + b.Property("TenantId") + .HasColumnName("TenantId"); + + b.Property("Url") + .HasColumnName("Url") + .HasMaxLength(256); + + b.Property("UserId") + .HasColumnName("UserId"); + + b.Property("UserName") + .HasColumnName("UserName") + .HasMaxLength(256); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ExecutionTime"); + + b.HasIndex("TenantId", "UserId", "ExecutionTime"); + + b.ToTable("AbpAuditLogs"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AuditLogId") + .HasColumnName("AuditLogId"); + + b.Property("ExecutionDuration") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnName("ExecutionTime"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties"); + + b.Property("MethodName") + .HasColumnName("MethodName") + .HasMaxLength(128); + + b.Property("Parameters") + .HasColumnName("Parameters") + .HasMaxLength(2000); + + b.Property("ServiceName") + .HasColumnName("ServiceName") + .HasMaxLength(256); + + b.Property("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); + + b.ToTable("AbpAuditLogActions"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AuditLogId") + .HasColumnName("AuditLogId"); + + b.Property("ChangeTime") + .HasColumnName("ChangeTime"); + + b.Property("ChangeType") + .HasColumnName("ChangeType"); + + b.Property("EntityId") + .IsRequired() + .HasColumnName("EntityId") + .HasMaxLength(128); + + b.Property("EntityTypeFullName") + .IsRequired() + .HasColumnName("EntityTypeFullName") + .HasMaxLength(128); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties"); + + b.Property("TenantId") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); + + b.ToTable("AbpEntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("EntityChangeId"); + + b.Property("NewValue") + .HasColumnName("NewValue") + .HasMaxLength(512); + + b.Property("OriginalValue") + .HasColumnName("OriginalValue") + .HasMaxLength(512); + + b.Property("PropertyName") + .IsRequired() + .HasColumnName("PropertyName") + .HasMaxLength(128); + + b.Property("PropertyTypeFullName") + .IsRequired() + .HasColumnName("PropertyTypeFullName") + .HasMaxLength(64); + + b.Property("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityChangeId"); + + b.ToTable("AbpEntityPropertyChanges"); + }); + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => { b.Property("Id") @@ -443,7 +639,7 @@ namespace IdentityServerHost.Migrations b.Property("BackChannelLogoutSessionRequired"); b.Property("BackChannelLogoutUri") - .HasMaxLength(2000); + .HasMaxLength(300); b.Property("ClientClaimsPrefix") .HasMaxLength(200); @@ -456,7 +652,7 @@ namespace IdentityServerHost.Migrations .HasMaxLength(200); b.Property("ClientUri") - .HasMaxLength(2000); + .HasMaxLength(300); b.Property("ConcurrencyStamp"); @@ -475,14 +671,14 @@ namespace IdentityServerHost.Migrations b.Property("FrontChannelLogoutSessionRequired"); b.Property("FrontChannelLogoutUri") - .HasMaxLength(2000); + .HasMaxLength(300); b.Property("IdentityTokenLifetime"); b.Property("IncludeJwtId"); b.Property("LogoUri") - .HasMaxLength(2000); + .HasMaxLength(300); b.Property("PairWiseSubjectSalt") .HasMaxLength(200); @@ -515,22 +711,15 @@ namespace IdentityServerHost.Migrations modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => { - b.Property("Id") - .ValueGeneratedOnAdd(); - b.Property("ClientId"); b.Property("Type") - .IsRequired() .HasMaxLength(250); b.Property("Value") - .IsRequired() .HasMaxLength(250); - b.HasKey("Id"); - - b.HasIndex("ClientId"); + b.HasKey("ClientId", "Type", "Value"); b.ToTable("IdentityServerClientClaims"); }); @@ -576,7 +765,7 @@ namespace IdentityServerHost.Migrations b.Property("ClientId"); b.Property("PostLogoutRedirectUri") - .HasMaxLength(2000); + .HasMaxLength(200); b.HasKey("ClientId", "PostLogoutRedirectUri"); @@ -588,11 +777,11 @@ namespace IdentityServerHost.Migrations b.Property("ClientId"); b.Property("Key") - .HasMaxLength(250); + .HasMaxLength(64); b.Property("Value") .IsRequired() - .HasMaxLength(2000); + .HasMaxLength(128); b.HasKey("ClientId", "Key"); @@ -604,7 +793,7 @@ namespace IdentityServerHost.Migrations b.Property("ClientId"); b.Property("RedirectUri") - .HasMaxLength(2000); + .HasMaxLength(200); b.HasKey("ClientId", "RedirectUri"); @@ -725,6 +914,82 @@ namespace IdentityServerHost.Migrations b.ToTable("IdentityServerIdentityResources"); }); + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64); + + b.Property("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey"); + + b.ToTable("AbpPermissionGrants"); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128); + + b.Property("ProviderKey") + .HasMaxLength(64); + + b.Property("ProviderName") + .HasMaxLength(64); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey"); + + b.ToTable("AbpSettings"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog") + .WithMany("Actions") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog") + .WithMany("EntityChanges") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.EntityChange") + .WithMany("PropertyChanges") + .HasForeignKey("EntityChangeId") + .OnDelete(DeleteBehavior.Cascade); + }); + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => { b.HasOne("Volo.Abp.Identity.IdentityRole") diff --git a/templates/service/host/IdentityServerHost/appsettings.json b/templates/service/host/IdentityServerHost/appsettings.json index 6e801d256d..98a4b98d4b 100644 --- a/templates/service/host/IdentityServerHost/appsettings.json +++ b/templates/service/host/IdentityServerHost/appsettings.json @@ -1,6 +1,7 @@ { "ConnectionStrings": { - "Default": "Server=localhost;Database=IdentityServerHost;Trusted_Connection=True;MultipleActiveResultSets=true", - "SqlServerCache": "Server=localhost;Database=MyProjectNameCache;Trusted_Connection=True;MultipleActiveResultSets=true" + "Default": "Server=localhost;Database=MyProjectName_Identity;Trusted_Connection=True;MultipleActiveResultSets=true", + + "SqlServerCache": "Server=localhost;Database=MyProjectName_Cache;Trusted_Connection=True;MultipleActiveResultSets=true" } } \ No newline at end of file diff --git a/templates/service/host/MyCompanyName.MyProjectName.Host/DemoAppDbContext.cs b/templates/service/host/MyCompanyName.MyProjectName.Host/DemoAppDbContext.cs index 1b3540e00b..ab9cad5293 100644 --- a/templates/service/host/MyCompanyName.MyProjectName.Host/DemoAppDbContext.cs +++ b/templates/service/host/MyCompanyName.MyProjectName.Host/DemoAppDbContext.cs @@ -21,8 +21,9 @@ namespace MyCompanyName.MyProjectName.Host modelBuilder.ConfigurePermissionManagement(); modelBuilder.ConfigureSettingManagement(); - modelBuilder.ConfigureMyProjectName(); modelBuilder.ConfigureAuditLogging(); + + modelBuilder.ConfigureMyProjectName(); } } } diff --git a/templates/service/host/MyCompanyName.MyProjectName.Host/Migrations/20190214093219_Initial.Designer.cs b/templates/service/host/MyCompanyName.MyProjectName.Host/Migrations/20190320142412_Initial.Designer.cs similarity index 99% rename from templates/service/host/MyCompanyName.MyProjectName.Host/Migrations/20190214093219_Initial.Designer.cs rename to templates/service/host/MyCompanyName.MyProjectName.Host/Migrations/20190320142412_Initial.Designer.cs index ee67505ed5..423eb1cb0a 100644 --- a/templates/service/host/MyCompanyName.MyProjectName.Host/Migrations/20190214093219_Initial.Designer.cs +++ b/templates/service/host/MyCompanyName.MyProjectName.Host/Migrations/20190320142412_Initial.Designer.cs @@ -10,7 +10,7 @@ using MyCompanyName.MyProjectName.Host; namespace MyCompanyName.MyProjectName.Host.Migrations { [DbContext(typeof(DemoAppDbContext))] - [Migration("20190214093219_Initial")] + [Migration("20190320142412_Initial")] partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) diff --git a/templates/service/host/MyCompanyName.MyProjectName.Host/Migrations/20190214093219_Initial.cs b/templates/service/host/MyCompanyName.MyProjectName.Host/Migrations/20190320142412_Initial.cs similarity index 100% rename from templates/service/host/MyCompanyName.MyProjectName.Host/Migrations/20190214093219_Initial.cs rename to templates/service/host/MyCompanyName.MyProjectName.Host/Migrations/20190320142412_Initial.cs diff --git a/templates/service/host/MyCompanyName.MyProjectName.Host/_CreateSqlServerCacheDatabase.bat b/templates/service/host/MyCompanyName.MyProjectName.Host/_CreateSqlServerCacheDatabase.bat index 6b8b9d7060..927f8a72d7 100644 --- a/templates/service/host/MyCompanyName.MyProjectName.Host/_CreateSqlServerCacheDatabase.bat +++ b/templates/service/host/MyCompanyName.MyProjectName.Host/_CreateSqlServerCacheDatabase.bat @@ -1 +1 @@ -dotnet sql-cache create "Server=localhost;Database=MyProjectNameCache;Trusted_Connection=True;MultipleActiveResultSets=true" dbo TestCache \ No newline at end of file +dotnet sql-cache create "Server=localhost;Database=MyProjectName_Cache;Trusted_Connection=True;MultipleActiveResultSets=true" dbo TestCache \ No newline at end of file diff --git a/templates/service/host/MyCompanyName.MyProjectName.Host/appsettings.json b/templates/service/host/MyCompanyName.MyProjectName.Host/appsettings.json index 76dc222001..a09353bfef 100644 --- a/templates/service/host/MyCompanyName.MyProjectName.Host/appsettings.json +++ b/templates/service/host/MyCompanyName.MyProjectName.Host/appsettings.json @@ -1,6 +1,11 @@ { "ConnectionStrings": { - "Default": "Server=localhost;Database=MyProjectNameHost;Trusted_Connection=True;MultipleActiveResultSets=true", - "SqlServerCache": "Server=localhost;Database=MyProjectNameCache;Trusted_Connection=True;MultipleActiveResultSets=true" + "Default": "Server=localhost;Database=MyProjectName_ModuleDb;Trusted_Connection=True;MultipleActiveResultSets=true", + + "AbpSettingManagement": "Server=localhost;Database=MyProjectName_Identity;Trusted_Connection=True;MultipleActiveResultSets=true", + "AbpPermissionManagement": "Server=localhost;Database=MyProjectName_Identity;Trusted_Connection=True;MultipleActiveResultSets=true", + "AbpAuditLogging": "Server=localhost;Database=MyProjectName_Identity;Trusted_Connection=True;MultipleActiveResultSets=true", + + "SqlServerCache": "Server=localhost;Database=MyProjectName_Cache;Trusted_Connection=True;MultipleActiveResultSets=true" } } \ No newline at end of file From 53af341f451bb5b7def6d6b1f5ffa4899ce01ff4 Mon Sep 17 00:00:00 2001 From: maliming Date: Thu, 21 Mar 2019 11:12:31 +0800 Subject: [PATCH 15/20] Complete the missing Chinese localization. --- .../Resources/AbpAccount/Web/zh-Hans.json | 14 +++++----- .../Docs/ApplicationContracts/zh-Hans.json | 10 +++++++ .../Resources/Docs/Web/zh-Hans.json | 26 +++++++++++++++++++ .../Docs/Localization/Domain/zh-Hans.json | 15 ++++++----- .../ApplicationContracts/zh-Hans.json | 6 +++-- .../AbpPermissionManagement/zh-Hans.json | 4 ++- .../AbpSettingManagement/zh-Hans.json | 6 +++++ 7 files changed, 65 insertions(+), 16 deletions(-) create mode 100644 modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/Localization/Resources/Docs/ApplicationContracts/zh-Hans.json create mode 100644 modules/docs/src/Volo.Docs.Admin.Web/Localization/Resources/Docs/Web/zh-Hans.json create mode 100644 modules/setting-management/src/Volo.Abp.SettingManagement.Web/Localization/Resources/AbpSettingManagement/zh-Hans.json diff --git a/modules/account/src/Volo.Abp.Account.Web/Localization/Resources/AbpAccount/Web/zh-Hans.json b/modules/account/src/Volo.Abp.Account.Web/Localization/Resources/AbpAccount/Web/zh-Hans.json index fdaa5ff228..9ceb4af554 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Localization/Resources/AbpAccount/Web/zh-Hans.json +++ b/modules/account/src/Volo.Abp.Account.Web/Localization/Resources/AbpAccount/Web/zh-Hans.json @@ -11,12 +11,12 @@ "InvalidUserNameOrPassword": "用户名或密码错误!", "LoginIsNotAllowed": "无法登录!你需要验证邮箱地址/手机号.", "SelfRegistrationDisabledMessage": "应用程序未开放注册,请联系管理员添加新用户.", - "Login": "Login", - "Cancel": "Cancel", - "Register": "Register", - "UseAnotherServiceToLogIn.": "Use another service to log in.", - "InvalidLoginRequest": "Invalid login request", - "ThereAreNoLoginSchemesConfiguredForThisClient": "There are no login schemes configured for this client.", - "LogInUsingYourProviderAccount": "Log in using your {0} account" + "Login": "登录", + "Cancel": "取消", + "Register": "注册", + "UseAnotherServiceToLogIn.": "使用其他服务登录.", + "InvalidLoginRequest": "登录请求无效", + "ThereAreNoLoginSchemesConfiguredForThisClient": "没有为此客户端配置登录方案.", + "LogInUsingYourProviderAccount": "使用您的{0}帐户登录" } } diff --git a/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/Localization/Resources/Docs/ApplicationContracts/zh-Hans.json b/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/Localization/Resources/Docs/ApplicationContracts/zh-Hans.json new file mode 100644 index 0000000000..3c8847ceae --- /dev/null +++ b/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/Localization/Resources/Docs/ApplicationContracts/zh-Hans.json @@ -0,0 +1,10 @@ +{ + "culture": "zh-Hans", + "texts": { + "Permission:DocumentManagement": "文档管理", + "Permission:Projects": "项目", + "Permission:Edit": "编辑", + "Permission:Delete": "删除", + "Permission:Create": "创建" + } + } \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Admin.Web/Localization/Resources/Docs/Web/zh-Hans.json b/modules/docs/src/Volo.Docs.Admin.Web/Localization/Resources/Docs/Web/zh-Hans.json new file mode 100644 index 0000000000..36bc285090 --- /dev/null +++ b/modules/docs/src/Volo.Docs.Admin.Web/Localization/Resources/Docs/Web/zh-Hans.json @@ -0,0 +1,26 @@ +{ + "culture": "zh-Hans", + "texts": { + "Menu:DocumentManagement": "文档", + "Menu:ProjectManagement": "项目", + "CreateANewProject": "创建新项目", + "Edit": "编辑", + "Create": "创建", + "Projects": "项目", + "Name": "名称", + "ShortName": "简称", + "DocumentStoreType": "文件存储类型", + "Format": "格式", + "ShortNameInfoText": "将用于唯一的URL.", + "DisplayName:Name": "名称", + "DisplayName:ShortName": "简称", + "DisplayName:Format": "格式", + "DisplayName:DefaultDocumentName": "默认文档名称", + "DisplayName:NavigationDocumentName": "导航文档名称", + "DisplayName:MinimumVersion": "最低版本", + "DisplayName:MainWebsiteUrl": "主网站网址", + "DisplayName:LatestVersionBranchName": "最新版本的分支名称", + "DisplayName:GitHubRootUrl": "GitHub根网址", + "DisplayName:GitHubAccessToken": "GitHub访问令牌" + } + } \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/zh-Hans.json b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/zh-Hans.json index 03a22148c2..f085265abf 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/zh-Hans.json +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/zh-Hans.json @@ -2,14 +2,17 @@ "culture": "zh-Hans", "texts": { "Documents": "文档", - "BackToWebsite": "返回网站", + "BackToWebsite": "返回主网站", + "Contributors": "贡献者", + "ShareOn": "分享到", "Version": "版本", "Edit": "编辑", - "InThisDocument": "在这个文档中", - "GoToTop": "返回顶部", + "Delete": "删除", + "InThisDocument": "在本文中", + "GoToTop": "到顶部", "Projects": "项目", - "NoProjectWarning": "当前并没有项目!", - "DocumentNotFound": "抱歉,您请求的文档不存在!", - "NavigationDocumentNotFound": "此版本并没有导航文档!" + "NoProjectWarning": "还没有项目!", + "DocumentNotFound": "找不到请求的文档!", + "NavigationDocumentNotFound": "这个版本没有导航文件!" } } diff --git a/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/Localization/ApplicationContracts/zh-Hans.json b/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/Localization/ApplicationContracts/zh-Hans.json index 616e9a62a3..cae53933d9 100644 --- a/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/Localization/ApplicationContracts/zh-Hans.json +++ b/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/Localization/ApplicationContracts/zh-Hans.json @@ -1,12 +1,14 @@ { "culture": "zh-Hans", "texts": { - "Permission:IdentityManagement": "身份认证管理", + "Volo.Abp.Identity:010001": "您无法删除自己的帐户!", + "Permission:IdentityManagement": "身份标识管理", "Permission:RoleManagement": "角色管理", "Permission:Create": "创建", "Permission:Edit": "编辑", "Permission:Delete": "删除", "Permission:ChangePermissions": "更改权限", - "Permission:UserManagement": "用户管理" + "Permission:UserManagement": "用户管理", + "Permission:UserLookup": "用户查询" } } \ No newline at end of file diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Localization/Resources/AbpPermissionManagement/zh-Hans.json b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Localization/Resources/AbpPermissionManagement/zh-Hans.json index 991c147b58..8384078b86 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Localization/Resources/AbpPermissionManagement/zh-Hans.json +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Localization/Resources/AbpPermissionManagement/zh-Hans.json @@ -1,6 +1,8 @@ { "culture": "zh-Hans", "texts": { - "Permissions": "权限" + "Permissions": "权限", + "OnlyProviderPermissons": "只有这个提供商", + "All": "所有" } } \ No newline at end of file diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Localization/Resources/AbpSettingManagement/zh-Hans.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Localization/Resources/AbpSettingManagement/zh-Hans.json new file mode 100644 index 0000000000..060fa17388 --- /dev/null +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Localization/Resources/AbpSettingManagement/zh-Hans.json @@ -0,0 +1,6 @@ +{ + "culture": "zh-Hans", + "texts": { + "Settings": "设置" + } + } \ No newline at end of file From 8a85149038fce893ab1648f238358342c1f1ad44 Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Thu, 21 Mar 2019 08:20:51 +0300 Subject: [PATCH 16/20] localization improvements --- framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/en.json | 1 + framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/tr.json | 1 + 2 files changed, 2 insertions(+) diff --git a/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/en.json b/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/en.json index 3a2233c7a6..9bd814af5c 100644 --- a/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/en.json +++ b/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/en.json @@ -25,6 +25,7 @@ "Delete": "Delete", "Edit": "Edit", "ProcessingWithThreeDot": "Processing...", + "Welcome": "Welcome", "Login": "Login", "Register": "Register", "Logout": "Log out", diff --git a/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/tr.json b/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/tr.json index 6162f7c35f..02ffb125f5 100644 --- a/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/tr.json +++ b/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/tr.json @@ -25,6 +25,7 @@ "Delete": "Sil", "Edit": "Düzenle", "ProcessingWithThreeDot": "İşleniyor...", + "Welcome": "Hoşgeldiniz", "Login": "Giriş", "Register": "Kaydol", "Logout": "Çıkış", From c609aa6a0d60603a4c225ff5c53670a278d4cdcb Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Thu, 21 Mar 2019 10:04:25 +0300 Subject: [PATCH 17/20] added Datatable localizations --- .../datatables/datatables-extensions.js | 17 +++++++++++++++++ .../Localization/Resources/AbpUi/en.json | 10 +++++++++- .../Localization/Resources/AbpUi/tr.json | 10 +++++++++- 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/datatables/datatables-extensions.js b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/datatables/datatables-extensions.js index bdb7976286..39199ccf93 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/datatables/datatables-extensions.js +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/datatables/datatables-extensions.js @@ -338,6 +338,23 @@ } } + configuration.language = { + info: localize("PagerInfo"), + infoFiltered: localize("PagerInfoFiltered"), + infoEmpty: localize("PagerInfoEmpty"), + search: localize("PagerSearch"), + processing: localize("ProcessingWithThreeDot"), + loadingRecords: localize("LoadingWithThreeDot"), + lengthMenu: localize("PagerShowMenuEntries"), + emptyTable: localize("NoDataAvailableInDatatable"), + paginate: { + first: localize("PagerFirst"), + last: localize("PagerLast"), + previous: localize("PagerPrevious"), + next: localize("PagerNext") + } + }; + configuration.dom = '<"dataTable_filters"f>rt<"row dataTable_footer"<"col-auto"l><"col-auto"i><"col"p>>'; return configuration; diff --git a/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/en.json b/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/en.json index 9bd814af5c..16af838025 100644 --- a/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/en.json +++ b/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/en.json @@ -25,15 +25,23 @@ "Delete": "Delete", "Edit": "Edit", "ProcessingWithThreeDot": "Processing...", + "LoadingWithThreeDot": "Loading...", "Welcome": "Welcome", "Login": "Login", "Register": "Register", "Logout": "Log out", "Submit": "Submit", "Back": "Back", + "PagerSearch": "Search", "PagerNext": "Next", "PagerPrevious": "Previous", - "PagerInfo": "Showing {0} to {1} of {2} entries.", + "PagerFirst": "First", + "PagerLast": "Last", + "PagerInfo": "Showing _START_ to _END_ of _TOTAL_ entries", + "PagerInfoEmpty": "Showing 0 to 0 of 0 entries", + "PagerInfoFiltered": "(filtered from _MAX_ total entries)", + "NoDataAvailableInDatatable": "No data available in table", + "PagerShowMenuEntries": "Show _MENU_ entries", "DatatableActionDropdownDefaultText": "Actions", "ChangePassword": "Change password", "PersonalInfo": "My profile" diff --git a/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/tr.json b/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/tr.json index 02ffb125f5..a3af7c3a22 100644 --- a/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/tr.json +++ b/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/tr.json @@ -25,15 +25,23 @@ "Delete": "Sil", "Edit": "Düzenle", "ProcessingWithThreeDot": "İşleniyor...", + "LoadingWithThreeDot": "Yükleniyor...", "Welcome": "Hoşgeldiniz", "Login": "Giriş", "Register": "Kaydol", "Logout": "Çıkış", "Submit": "Gönder", "Back": "Geri", + "PagerSearch": "Ara", "PagerNext": "Sonraki", "PagerPrevious": "Önceki", - "PagerInfo": "{2} kayıttan {0} ile {1} arası gösteriliyor.", + "PagerFirst": "İlk", + "PagerLast": "Son", + "PagerInfo": "_TOTAL_ kayıttan _START_ ile _END_ arası gösteriliyor.", + "PagerInfoEmpty": "0 kayıttan 0 ile 0 arası gösteriliyor.", + "PagerInfoFiltered": "(_MAX_ kayıt arasından filtrelendi)", + "NoDataAvailableInDatatable": "Tabloda kayır mevcut değil.", + "PagerShowMenuEntries": "Sayfada _MENU_ kayıt göster.", "DatatableActionDropdownDefaultText": "İşlemler", "ChangePassword": "Şifre değiştir", "PersonalInfo": "Profilim" From e1dce26e32a757bcfa6d9e94250c3f1a7bf0b6d8 Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Thu, 21 Mar 2019 10:48:20 +0300 Subject: [PATCH 18/20] Fix AbpDictionaryBasedStringLocalizer --- .../Volo/Abp/Localization/AbpDictionaryBasedStringLocalizer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpDictionaryBasedStringLocalizer.cs b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpDictionaryBasedStringLocalizer.cs index 0cfe90d9ef..b1741d0ca0 100644 --- a/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpDictionaryBasedStringLocalizer.cs +++ b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpDictionaryBasedStringLocalizer.cs @@ -206,7 +206,7 @@ namespace Volo.Abp.Localization public IEnumerable GetAllStrings(bool includeParentCultures, bool includeBaseLocalizers) { - return _innerLocalizer.GetAllStrings(includeParentCultures, includeBaseLocalizers); + return _innerLocalizer.GetAllStrings(_cultureName, includeParentCultures, includeBaseLocalizers); } } } From 1b0626752cee1fb412bbc5d65175f34bdc5f70d3 Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Thu, 21 Mar 2019 14:39:45 +0300 Subject: [PATCH 19/20] Fix IdentityUserAppService.Delete --- .../Volo/Abp/Identity/IdentityUserAppService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs b/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs index 814d32fd19..251b429d33 100644 --- a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs +++ b/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs @@ -80,7 +80,7 @@ namespace Volo.Abp.Identity [Authorize(IdentityPermissions.Users.Delete)] public async Task DeleteAsync(Guid id) { - if (CurrentUser.Id.Value == id) + if (CurrentUser.Id == id) { throw new BusinessException(code: IdentityErrorCodes.UserSelfDeletion); } From b20d9524ee24c6d8ec5dae8303cb9b30645475d5 Mon Sep 17 00:00:00 2001 From: maliming Date: Thu, 21 Mar 2019 20:23:38 +0800 Subject: [PATCH 20/20] Datatable chinese localizations. --- .../Localization/Resources/AbpUi/zh-Hans.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/zh-Hans.json b/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/zh-Hans.json index e3d8028f0a..c6979529a7 100644 --- a/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/zh-Hans.json +++ b/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/zh-Hans.json @@ -25,14 +25,23 @@ "Delete": "删除", "Edit": "修改", "ProcessingWithThreeDot": "处理中...", + "LoadingWithThreeDot": "加载中...", + "Welcome": "欢迎", "Login": "登录", "Register": "注册", "Logout": "注销", "Submit": "提交", "Back": "返回", + "PagerSearch": "搜索", "PagerNext": "下一页", "PagerPrevious": "上一页", + "PagerFirst": "首页", + "PagerLast": "尾页", "PagerInfo": "显示 {0} 到 {1} 个 {2} 条目.", + "PagerInfoEmpty": "显示0个条目中的0到0", + "PagerInfoFiltered": "(从 _MAX_ 总条目中过滤掉)", + "NoDataAvailableInDatatable": "表中没有数据", + "PagerShowMenuEntries": "显示 _MENU_ 实体", "DatatableActionDropdownDefaultText": "操作", "ChangePassword": "修改密码", "PersonalInfo": "个人信息"