Merge branch 'dev' into maliming/FodyConfigureAwait

pull/2645/head
maliming 6 years ago
commit 35f0717a6f

@ -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"
)

@ -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"
)

@ -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

@ -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

@ -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"
)

@ -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

@ -1,3 +1,43 @@
# Hangfire Background Job Manager
TODO
[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...

@ -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);
}

@ -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 = "<div class=\"col-" + columnSize + "\">" + Environment.NewLine +
var surroundedContents = "<div class=\"col-md-" + columnSize + "\">" + Environment.NewLine +
contents +
" </div>";

@ -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)

@ -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;

@ -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<IActionResult> 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");
}
}
}

@ -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<IdentityUser> _signInManager;
public LogoutController(SignInManager<IdentityUser> signInManager)
{
_signInManager = signInManager;
}
//todo@alper: this method can be moved to AccountController like "account/logout"
public async Task<IActionResult> Index(string returnUrl = null)
{
await _signInManager.SignOutAsync();
if (returnUrl != null)
{
return LocalRedirect(returnUrl);
}
return RedirectToPage("/Account/Login");
}
}
}

@ -0,0 +1,3 @@
@page "/Account/Logout"
@inherits Volo.Abp.Account.Web.Pages.Account.AccountPage
@model Volo.Abp.Account.Web.Pages.Account.LogoutModel

@ -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<IActionResult> OnGetAsync()
{
await SignInManager.SignOutAsync();
if (ReturnUrl != null)
{
return RedirectSafely(ReturnUrl, ReturnUrlHash);
}
return RedirectToPage("/Account/Login");
}
}
}

@ -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",

@ -9,6 +9,7 @@
serverSide: true,
paging: false,
info: false,
scrollX: true,
searching: false,
autoWidth: false,
scrollCollapse: true,

@ -16,6 +16,7 @@
var _dataTable = $('#ProjectsTable').DataTable(abp.libs.datatables.normalizeConfiguration({
processing: true,
serverSide: true,
scrollX: true,
paging: true,
searching: false,
autoWidth: false,

@ -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 () {

@ -17,6 +17,7 @@
searching: false,
processing: true,
serverSide: true,
scrollX: true,
paging: true,
ajax: abp.libs.datatables.createAjax(_identityRoleAppService.getList),
columnDefs: [

@ -15,6 +15,7 @@
order: [[1, "asc"]],
processing: true,
serverSide: true,
scrollX: true,
paging: true,
ajax: abp.libs.datatables.createAjax(_identityUserAppService.getList),
columnDefs: [

@ -19,6 +19,7 @@
order: [[1, "asc"]],
processing: true,
paging: true,
scrollX: true,
serverSide: true,
ajax: abp.libs.datatables.createAjax(_tenantAppService.getList),
columnDefs: [

@ -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');
}

@ -3,7 +3,7 @@
<div class="card border-0 shadow-sm">
<div class="card-body">
<div class="row">
<div class="col-3">
<div class="col-12 col-md-3">
<ul class="nav flex-column nav-pills" id="nav-tab" role="tablist">
<li class="nav-item" (click)="selectedTab = 0">
<a
@ -14,7 +14,7 @@
>{{ 'AbpUi::ChangePassword' | abpLocalization }}</a
>
</li>
<li class="nav-item" (click)="selectedTab = 1">
<li class="nav-item mb-2" (click)="selectedTab = 1">
<a
class="nav-link"
[ngClass]="{ active: selectedTab === 1 }"
@ -25,7 +25,7 @@
</li>
</ul>
</div>
<div class="col-9">
<div class="col-12 col-md-9">
<div class="tab-content" *ngIf="selectedTab === 0" [@fadeIn]>
<div class="tab-pane active" role="tabpanel">
<h4>

@ -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');
}

@ -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));
}

@ -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');
}

@ -22,7 +22,7 @@
<hr class="mt-2 mb-2" />
<div class="row">
<div class="col-4">
<div class="col-12 col-md-4">
<ul class="nav nav-pills flex-column">
<li *ngFor="let group of groups$ | async; trackBy: trackByFn" class="nav-item">
<a
@ -34,7 +34,7 @@
</li>
</ul>
</div>
<div class="col-8">
<div class="col-12 col-md-8">
<h4>{{ selectedGroup?.displayName }}</h4>
<hr class="mt-2 mb-3" />
<div class="pl-1 pt-1">

@ -2,7 +2,7 @@
<div class="col-auto">
<h1 class="content-header-title">{{ 'AbpSettingManagement::Settings' | abpLocalization }}</h1>
</div>
<div id="breadcrumb" class="col-md-auto pl-md-0">
<div id="breadcrumb" class="col-lg-auto pl-lg-0">
<abp-breadcrumb></abp-breadcrumb>
</div>
<div class="col">

@ -1,5 +1,5 @@
<nav
class="navbar navbar-expand-md navbar-dark bg-dark shadow-sm flex-column flex-md-row mb-4"
class="navbar navbar-expand-lg navbar-dark bg-dark shadow-sm flex-column flex-md-row mb-4"
id="main-navbar"
style="min-height: 4rem;"
>
@ -67,9 +67,7 @@
#routeContainer
class="dropdown-menu border-0 shadow-sm"
(click)="$event.preventDefault(); $event.stopPropagation()"
[class.abp-collapsed-height]="smallScreen"
[class.d-block]="smallScreen"
[class.abp-mh-25]="smallScreen && navbarRootDropdown.expand"
[class.d-block]="smallScreen && navbarRootDropdown.expand"
>
<ng-template
#forTemplate
@ -124,9 +122,7 @@
<div
#childrenContainer
class="dropdown-menu border-0 shadow-sm"
[class.abp-collapsed-height]="smallScreen"
[class.d-block]="smallScreen"
[class.abp-mh-25]="smallScreen && dropdownSubmenu.isOpen()"
[class.d-block]="smallScreen && dropdownSubmenu.isOpen()"
>
<ng-template
ngFor
@ -182,9 +178,7 @@
<div
class="dropdown-menu dropdown-menu-right border-0 shadow-sm"
aria-labelledby="dropdownMenuLink"
[class.abp-collapsed-height]="smallScreen"
[class.d-block]="smallScreen"
[class.abp-mh-25]="smallScreen && languageDropdown.isOpen()"
[class.d-block]="smallScreen && languageDropdown.isOpen()"
>
<a
*ngFor="let lang of dropdownLanguages$ | async"
@ -216,9 +210,7 @@
<div
class="dropdown-menu dropdown-menu-right border-0 shadow-sm"
aria-labelledby="dropdownMenuLink"
[class.abp-collapsed-height]="smallScreen"
[class.d-block]="smallScreen"
[class.abp-mh-25]="smallScreen && currentUserDropdown.isOpen()"
[class.d-block]="smallScreen && currentUserDropdown.isOpen()"
>
<a class="dropdown-item" routerLink="/account/manage-profile"
><i class="fa fa-cog mr-1"></i>{{ 'AbpAccount::ManageYourProfile' | abpLocalization }}</a

@ -24,6 +24,9 @@
width: 450px;
min-height: 300px;
z-index: 1062 !important;
@media screen and (max-width: 500px) {
width: 90vw;
}
.icon-container {
display: flex;
align-items: center;

@ -20,7 +20,17 @@ $solutionPaths = (
"modules/background-jobs",
"modules/client-simulation",
"templates/module/aspnet-core",
"templates/app/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"
)
# Test all solutions

Loading…
Cancel
Save