diff --git a/build-all-release.ps1 b/build-all-release.ps1 index e6555f8d6b..9c4837ee91 100644 --- a/build-all-release.ps1 +++ b/build-all-release.ps1 @@ -21,6 +21,15 @@ $solutionPaths = ( "modules/client-simulation", "templates/module/aspnet-core", "templates/app/aspnet-core", + "samples/BasicAspNetCoreApplication", + "samples/BasicConsoleApplication", + "samples/BookStore", + "samples/BookStore-Angular-MongoDb/aspnet-core", + "samples/BookStore-Modular/modules/book-management", + "samples/BookStore-Modular/application", + "samples/DashboardDemo", + "samples/MicroserviceDemo", + "samples/RabbitMqEventBus", "abp_io/AbpIoLocalization" ) diff --git a/build-all.ps1 b/build-all.ps1 index 649abc5f8c..cb8c545acc 100644 --- a/build-all.ps1 +++ b/build-all.ps1 @@ -21,6 +21,15 @@ $solutionPaths = ( "modules/client-simulation", "templates/module/aspnet-core", "templates/app/aspnet-core", + "samples/BasicAspNetCoreApplication", + "samples/BasicConsoleApplication", + "samples/BookStore", + "samples/BookStore-Angular-MongoDb/aspnet-core", + "samples/BookStore-Modular/modules/book-management", + "samples/BookStore-Modular/application", + "samples/DashboardDemo", + "samples/MicroserviceDemo", + "samples/RabbitMqEventBus", "abp_io/AbpIoLocalization" ) diff --git a/build/build-all-release.ps1 b/build/build-all-release.ps1 new file mode 100644 index 0000000000..1c86351379 --- /dev/null +++ b/build/build-all-release.ps1 @@ -0,0 +1,16 @@ +. ".\common.ps1" + +# Build all solutions + +foreach ($solutionPath in $solutionPaths) { + $solutionAbsPath = (Join-Path $rootFolder $solutionPath) + Set-Location $solutionAbsPath + dotnet build --configuration Release + if (-Not $?) { + Write-Host ("Build failed for the solution: " + $solutionPath) + Set-Location $rootFolder + exit $LASTEXITCODE + } +} + +Set-Location $rootFolder diff --git a/build/build-all.ps1 b/build/build-all.ps1 new file mode 100644 index 0000000000..ffaffa67a3 --- /dev/null +++ b/build/build-all.ps1 @@ -0,0 +1,16 @@ +. ".\common.ps1" + +# Build all solutions + +foreach ($solutionPath in $solutionPaths) { + $solutionAbsPath = (Join-Path $rootFolder $solutionPath) + Set-Location $solutionAbsPath + dotnet build + if (-Not $?) { + Write-Host ("Build failed for the solution: " + $solutionPath) + Set-Location $rootFolder + exit $LASTEXITCODE + } +} + +Set-Location $rootFolder diff --git a/build/common.ps1 b/build/common.ps1 new file mode 100644 index 0000000000..e4ba6a8adc --- /dev/null +++ b/build/common.ps1 @@ -0,0 +1,34 @@ +# COMMON PATHS + +$rootFolder = (Get-Item -Path "./" -Verbose).FullName + +# List of solutions + +$solutionPaths = ( + "../framework", + "../modules/users", + "../modules/permission-management", + "../modules/setting-management", + "../modules/feature-management", + "../modules/identity", + "../modules/identityserver", + "../modules/tenant-management", + "../modules/account", + "../modules/docs", + "../modules/blogging", + "../modules/audit-logging", + "../modules/background-jobs", + "../modules/client-simulation", + "../templates/module/aspnet-core", + "../templates/app/aspnet-core", + "../samples/BasicAspNetCoreApplication", + "../samples/BasicConsoleApplication", + "../samples/BookStore", + "../samples/BookStore-Angular-MongoDb/aspnet-core", + "../samples/BookStore-Modular/modules/book-management", + "../samples/BookStore-Modular/application", + "../samples/DashboardDemo", + "../samples/MicroserviceDemo", + "../samples/RabbitMqEventBus", + "../abp_io/AbpIoLocalization" +) \ No newline at end of file diff --git a/build/test-all.ps1 b/build/test-all.ps1 new file mode 100644 index 0000000000..1465bff6c3 --- /dev/null +++ b/build/test-all.ps1 @@ -0,0 +1,16 @@ +. ".\common.ps1" + +# Test all solutions + +foreach ($solutionPath in $solutionPaths) { + $solutionAbsPath = (Join-Path $rootFolder $solutionPath) + Set-Location $solutionAbsPath + dotnet test --no-build --no-restore + if (-Not $?) { + Write-Host ("Test failed for the solution: " + $solutionPath) + Set-Location $rootFolder + exit $LASTEXITCODE + } +} + +Set-Location $rootFolder diff --git a/docs/en/Background-Jobs-Hangfire.md b/docs/en/Background-Jobs-Hangfire.md index 031ae28589..588fcace9e 100644 --- a/docs/en/Background-Jobs-Hangfire.md +++ b/docs/en/Background-Jobs-Hangfire.md @@ -1,3 +1,43 @@ # Hangfire Background Job Manager -TODO \ No newline at end of file +[Hangfire](https://www.hangfire.io/) is an advanced background job manager. You can integrate Hangfire with the ABP Framework to use it instead of the [default background job manager](Background-Jobs.md). In this way, you can use the same background job API for Hangfire and your code will be independent of Hangfire. If you like, you can directly use Hangfire's API, too. + +> See the [background jobs document](Background-Jobs.md) to learn how to use the background job system. This document only shows how to install and configure the Hangfire integration. + +## Installation + +It is suggested to use the [ABP CLI](CLI.md) to install this package. + +### Using the ABP CLI + +Open a command line window in the folder of the project (.csproj file) and type the following command: + +````bash +abp add-package Volo.Abp.BackgroundJobs.HangFire +```` + +### Manual Installation + +If you want to manually install; + +1. Add the [Volo.Abp.BackgroundJobs.HangFire](https://www.nuget.org/packages/Volo.Abp.BackgroundJobs.HangFire) NuGet package to your project: + + ```` + Install-Package Volo.Abp.BackgroundJobs.HangFire + ```` + +2. Add the `AbpBackgroundJobsHangfireModule` to the dependency list of your module: + +````csharp +[DependsOn( + //...other dependencies + typeof(AbpBackgroundJobsHangfireModule) //Add the new module dependency + )] +public class YourModule : AbpModule +{ +} +```` + +## Configuration + +TODO... \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Grid/AbpColumnTagHelperService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Grid/AbpColumnTagHelperService.cs index e78d59ee82..bb8107bc52 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Grid/AbpColumnTagHelperService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Grid/AbpColumnTagHelperService.cs @@ -8,6 +8,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Grid public override void Process(TagHelperContext context, TagHelperOutput output) { output.TagName = "div"; + output.Attributes.AddClass("col"); ProcessSizeClasses(context, output); @@ -52,6 +53,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Grid classString += "-" + size.ToString("D"); } + output.Attributes.RemoveClass("col"); output.Attributes.AddClass(classString); } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Tab/AbpTabsTagHelperService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Tab/AbpTabsTagHelperService.cs index 0098cbc1f0..a28e0c7057 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Tab/AbpTabsTagHelperService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Tab/AbpTabsTagHelperService.cs @@ -45,8 +45,8 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Tab var headerColumnSize = GetHeaderColumnSize(); var contentColumnSize = 12 - headerColumnSize; - headers = PlaceInsideColunm(headers, headerColumnSize); - contents = PlaceInsideColunm(contents, contentColumnSize); + headers = PlaceInsideColumn(headers, headerColumnSize); + contents = PlaceInsideColumn(contents, contentColumnSize); } @@ -79,9 +79,9 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Tab return surroundedContents; } - protected virtual string PlaceInsideColunm(string contents, int columnSize) + protected virtual string PlaceInsideColumn(string contents, int columnSize) { - var surroundedContents = "
" + Environment.NewLine + + var surroundedContents = "
" + Environment.NewLine + contents + "
"; diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Authentication/ChallengeAccountController.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Authentication/ChallengeAccountController.cs index de8958920d..36e0bebfd6 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Authentication/ChallengeAccountController.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Authentication/ChallengeAccountController.cs @@ -8,10 +8,12 @@ namespace Volo.Abp.AspNetCore.Mvc.Authentication public abstract class ChallengeAccountController : AbpController { protected string[] ChallengeAuthenticationSchemas { get; } + protected string AuthenticationType { get; } protected ChallengeAccountController(string[] challengeAuthenticationSchemas = null) { - ChallengeAuthenticationSchemas = challengeAuthenticationSchemas ?? new[]{ "oidc" }; + ChallengeAuthenticationSchemas = challengeAuthenticationSchemas ?? new[] { "oidc" }; + AuthenticationType = "Identity.Application"; } [HttpGet] @@ -42,7 +44,12 @@ namespace Volo.Abp.AspNetCore.Mvc.Authentication { await HttpContext.SignOutAsync(); - return RedirectSafely(returnUrl, returnUrlHash); + if (HttpContext.User.Identity.AuthenticationType == AuthenticationType) + { + return RedirectSafely(returnUrl, returnUrlHash); + } + + return new SignOutResult(ChallengeAuthenticationSchemas); } protected RedirectResult RedirectSafely(string returnUrl, string returnUrlHash = null) diff --git a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/ApplicationService.cs b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/ApplicationService.cs index 0de23c826b..32c90677b8 100644 --- a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/ApplicationService.cs +++ b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/ApplicationService.cs @@ -9,7 +9,6 @@ using System.Collections.Generic; using System.Threading.Tasks; using Volo.Abp.Aspects; using Volo.Abp.Auditing; -using Volo.Abp.Authorization; using Volo.Abp.DependencyInjection; using Volo.Abp.Features; using Volo.Abp.Guids; diff --git a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Account/IdentityServerSupportedLogoutModel.cs b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Account/IdentityServerSupportedLogoutModel.cs new file mode 100644 index 0000000000..ab403ea5a1 --- /dev/null +++ b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Account/IdentityServerSupportedLogoutModel.cs @@ -0,0 +1,44 @@ +using IdentityServer4.Services; +using Microsoft.AspNetCore.Mvc; +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; + +namespace Volo.Abp.Account.Web.Pages.Account +{ + [ExposeServices(typeof(LogoutModel))] + public class IdentityServerSupportedLogoutModel : LogoutModel + { + protected IIdentityServerInteractionService Interaction { get; } + + public IdentityServerSupportedLogoutModel(IIdentityServerInteractionService interaction) + { + Interaction = interaction; + } + + public override async Task OnGetAsync() + { + await SignInManager.SignOutAsync(); + + var logoutId = Request.Query["logoutId"].ToString(); + + if (!string.IsNullOrEmpty(logoutId)) + { + var logoutContext = await Interaction.GetLogoutContextAsync(logoutId); + + var postLogoutUri = logoutContext.PostLogoutRedirectUri; + + if (!string.IsNullOrEmpty(postLogoutUri)) + { + return Redirect(postLogoutUri); + } + } + + if (ReturnUrl != null) + { + return LocalRedirect(ReturnUrl); + } + + return RedirectToPage("/Account/Login"); + } + } +} diff --git a/modules/account/src/Volo.Abp.Account.Web/Areas/Account/Controllers/LogoutController.cs b/modules/account/src/Volo.Abp.Account.Web/Areas/Account/Controllers/LogoutController.cs deleted file mode 100644 index eb7d1cbc84..0000000000 --- a/modules/account/src/Volo.Abp.Account.Web/Areas/Account/Controllers/LogoutController.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Threading.Tasks; -using Microsoft.AspNetCore.Identity; -using Microsoft.AspNetCore.Mvc; -using Volo.Abp.AspNetCore.Mvc; -using IdentityUser = Volo.Abp.Identity.IdentityUser; - -namespace Volo.Abp.Account.Web.Areas.Account.Controllers -{ - [Area("Account")] - public class LogoutController : AbpController - { - private readonly SignInManager _signInManager; - - public LogoutController(SignInManager signInManager) - { - _signInManager = signInManager; - } - - //todo@alper: this method can be moved to AccountController like "account/logout" - public async Task Index(string returnUrl = null) - { - await _signInManager.SignOutAsync(); - - if (returnUrl != null) - { - return LocalRedirect(returnUrl); - } - - return RedirectToPage("/Account/Login"); - } - } -} diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Logout.cshtml b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Logout.cshtml new file mode 100644 index 0000000000..f57c7258d1 --- /dev/null +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Logout.cshtml @@ -0,0 +1,3 @@ +@page "/Account/Logout" +@inherits Volo.Abp.Account.Web.Pages.Account.AccountPage +@model Volo.Abp.Account.Web.Pages.Account.LogoutModel \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Logout.cshtml.cs b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Logout.cshtml.cs new file mode 100644 index 0000000000..8245cc5a77 --- /dev/null +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Logout.cshtml.cs @@ -0,0 +1,27 @@ +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; + +namespace Volo.Abp.Account.Web.Pages.Account +{ + public class LogoutModel : AccountPageModel + { + [HiddenInput] + [BindProperty(SupportsGet = true)] + public string ReturnUrl { get; set; } + + [HiddenInput] + [BindProperty(SupportsGet = true)] + public string ReturnUrlHash { get; set; } + + public virtual async Task OnGetAsync() + { + await SignInManager.SignOutAsync(); + if (ReturnUrl != null) + { + return RedirectSafely(ReturnUrl, ReturnUrlHash); + } + + return RedirectToPage("/Account/Login"); + } + } +} diff --git a/modules/audit-logging/test/Volo.Abp.AuditLogging.TestBase/Volo/Abp/AuditLogging/AuditLogRepository_Tests.cs b/modules/audit-logging/test/Volo.Abp.AuditLogging.TestBase/Volo/Abp/AuditLogging/AuditLogRepository_Tests.cs index 7ea6f4e0db..f88c10c079 100644 --- a/modules/audit-logging/test/Volo.Abp.AuditLogging.TestBase/Volo/Abp/AuditLogging/AuditLogRepository_Tests.cs +++ b/modules/audit-logging/test/Volo.Abp.AuditLogging.TestBase/Volo/Abp/AuditLogging/AuditLogRepository_Tests.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Globalization; using System.Linq; using System.Net; using System.Threading.Tasks; @@ -243,7 +244,7 @@ namespace Volo.Abp.AuditLogging UserId = userId, ImpersonatorUserId = Guid.NewGuid(), ImpersonatorTenantId = Guid.NewGuid(), - ExecutionTime = DateTime.Parse("2020-01-01 01:00:00"), + ExecutionTime = DateTime.SpecifyKind(DateTime.Parse("2020-01-01 01:00:00"), DateTimeKind.Utc), ExecutionDuration = 45, ClientIpAddress = ipAddress, ClientName = "MyDesktop", @@ -294,7 +295,7 @@ namespace Volo.Abp.AuditLogging UserId = userId2, ImpersonatorUserId = Guid.NewGuid(), ImpersonatorTenantId = Guid.NewGuid(), - ExecutionTime = DateTime.Parse("2020-01-01 03:00:00"), + ExecutionTime = DateTime.SpecifyKind(DateTime.Parse("2020-01-01 03:00:00"), DateTimeKind.Utc), ExecutionDuration = 55, ClientIpAddress = ipAddress, ClientName = "MyDesktop", diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/index.js b/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/index.js index 0d8e8b3641..c2a18e083d 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/index.js +++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Admin/Blogs/index.js @@ -9,6 +9,7 @@ serverSide: true, paging: false, info: false, + scrollX: true, searching: false, autoWidth: false, scrollCollapse: true, diff --git a/modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Projects/index.js b/modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Projects/index.js index f1ce283543..d25d04d671 100644 --- a/modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Projects/index.js +++ b/modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Projects/index.js @@ -16,6 +16,7 @@ var _dataTable = $('#ProjectsTable').DataTable(abp.libs.datatables.normalizeConfiguration({ processing: true, serverSide: true, + scrollX: true, paging: true, searching: false, autoWidth: false, diff --git a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/index.js b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/index.js index a95677891e..9cbfd547ab 100644 --- a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/index.js +++ b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/index.js @@ -5,7 +5,6 @@ var $navigation = $("#" + navigationContainerId); - var getShownDocumentLinks = function () { return $navigation.find(".mCSB_container > li a:visible").not(".tree-toggle"); }; @@ -140,6 +139,12 @@ window.history.replaceState({}, document.title, new_uri); }; + var getTenYearsLater = function () { + var tenYearsLater = new Date(); + tenYearsLater.setTime(tenYearsLater.getTime() + (365 * 10 * 24 * 60 * 60 * 1000)); + return tenYearsLater; + }; + var setCookies = function () { var cookie = abp.utils.getCookieValue("AbpDocsPreferences"); @@ -161,7 +166,6 @@ if (splitted.length > 0 && splitted[0] === key) { keyValues[k] = key + "=" + value; - console.log(keyValues[k]); changed = true; } } @@ -171,7 +175,7 @@ } } - abp.utils.setCookieValue("AbpDocsPreferences", keyValues.join('|')); + abp.utils.setCookieValue("AbpDocsPreferences", keyValues.join('|'), getTenYearsLater(), '/'); }; $(".doc-section-combobox").change(function () { diff --git a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/index.js b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/index.js index eb0892338c..8332a95ac7 100644 --- a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/index.js +++ b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/index.js @@ -17,6 +17,7 @@ searching: false, processing: true, serverSide: true, + scrollX: true, paging: true, ajax: abp.libs.datatables.createAjax(_identityRoleAppService.getList), columnDefs: [ diff --git a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/index.js b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/index.js index 4d8486d256..64505509ba 100644 --- a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/index.js +++ b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/index.js @@ -15,6 +15,7 @@ order: [[1, "asc"]], processing: true, serverSide: true, + scrollX: true, paging: true, ajax: abp.libs.datatables.createAjax(_identityUserAppService.getList), columnDefs: [ diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/Index.js b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/Index.js index 3ae75e6ad6..0dc1861790 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/Index.js +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/Index.js @@ -19,6 +19,7 @@ order: [[1, "asc"]], processing: true, paging: true, + scrollX: true, serverSide: true, ajax: abp.libs.datatables.createAjax(_tenantAppService.getList), columnDefs: [ diff --git a/npm/ng-packs/packages/account/src/lib/components/change-password/change-password.component.ts b/npm/ng-packs/packages/account/src/lib/components/change-password/change-password.component.ts index e9125de3c3..87169a2c1f 100644 --- a/npm/ng-packs/packages/account/src/lib/components/change-password/change-password.component.ts +++ b/npm/ng-packs/packages/account/src/lib/components/change-password/change-password.component.ts @@ -54,7 +54,9 @@ export class ChangePasswordComponent passwordRulesArr.push('capital'); } - if (+(passwordRules['Abp.Identity.Password.RequiredUniqueChars'] || 0) > 0) { + if ( + (passwordRules['Abp.Identity.Password.RequireNonAlphanumeric'] || '').toLowerCase() === 'true' + ) { passwordRulesArr.push('special'); } diff --git a/npm/ng-packs/packages/account/src/lib/components/manage-profile/manage-profile.component.html b/npm/ng-packs/packages/account/src/lib/components/manage-profile/manage-profile.component.html index 04dd582ac7..20ddf69a06 100644 --- a/npm/ng-packs/packages/account/src/lib/components/manage-profile/manage-profile.component.html +++ b/npm/ng-packs/packages/account/src/lib/components/manage-profile/manage-profile.component.html @@ -3,7 +3,7 @@
-
+ -
+

diff --git a/npm/ng-packs/packages/account/src/lib/components/register/register.component.ts b/npm/ng-packs/packages/account/src/lib/components/register/register.component.ts index a76de66626..6785fc67fd 100644 --- a/npm/ng-packs/packages/account/src/lib/components/register/register.component.ts +++ b/npm/ng-packs/packages/account/src/lib/components/register/register.component.ts @@ -71,7 +71,9 @@ export class RegisterComponent implements OnInit { passwordRulesArr.push('capital'); } - if (+(passwordRules['Abp.Identity.Password.RequiredUniqueChars'] || 0) > 0) { + if ( + (passwordRules['Abp.Identity.Password.RequireNonAlphanumeric'] || '').toLowerCase() === 'true' + ) { passwordRulesArr.push('special'); } diff --git a/npm/ng-packs/packages/core/src/lib/services/localization.service.ts b/npm/ng-packs/packages/core/src/lib/services/localization.service.ts index d87d28a938..b12b517156 100644 --- a/npm/ng-packs/packages/core/src/lib/services/localization.service.ts +++ b/npm/ng-packs/packages/core/src/lib/services/localization.service.ts @@ -10,6 +10,9 @@ type ShouldReuseRoute = (future: ActivatedRouteSnapshot, curr: ActivatedRouteSna @Injectable({ providedIn: 'root' }) export class LocalizationService { + /** + * Returns currently selected language + */ get currentLang(): string { return this.store.selectSnapshot(state => state.SessionState.language); } @@ -42,6 +45,11 @@ export class LocalizationService { }); } + /** + * Returns an observable localized text with the given interpolation parameters in current language. + * @param key Localizaton key to replace with localized text + * @param interpolateParams Values to interpolate + */ get( key: string | Config.LocalizationWithDefault, ...interpolateParams: string[] @@ -49,6 +57,11 @@ export class LocalizationService { return this.store.select(ConfigState.getLocalization(key, ...interpolateParams)); } + /** + * Returns localized text with the given interpolation parameters in current language. + * @param key Localization key to replace with localized text + * @param interpolateParams Values to intepolate. + */ instant(key: string | Config.LocalizationWithDefault, ...interpolateParams: string[]): string { return this.store.selectSnapshot(ConfigState.getLocalization(key, ...interpolateParams)); } diff --git a/npm/ng-packs/packages/identity/src/lib/components/users/users.component.ts b/npm/ng-packs/packages/identity/src/lib/components/users/users.component.ts index 127cf15735..47ef7cca23 100644 --- a/npm/ng-packs/packages/identity/src/lib/components/users/users.component.ts +++ b/npm/ng-packs/packages/identity/src/lib/components/users/users.component.ts @@ -102,7 +102,9 @@ export class UsersComponent implements OnInit { this.passwordRulesArr.push('capital'); } - if (+(passwordRules['Abp.Identity.Password.RequiredUniqueChars'] || 0) > 0) { + if ( + (passwordRules['Abp.Identity.Password.RequireNonAlphanumeric'] || '').toLowerCase() === 'true' + ) { this.passwordRulesArr.push('special'); } diff --git a/npm/ng-packs/packages/permission-management/src/lib/components/permission-management.component.html b/npm/ng-packs/packages/permission-management/src/lib/components/permission-management.component.html index 3e4a1ec3a3..5a5e70e2f5 100644 --- a/npm/ng-packs/packages/permission-management/src/lib/components/permission-management.component.html +++ b/npm/ng-packs/packages/permission-management/src/lib/components/permission-management.component.html @@ -22,7 +22,7 @@