Skip to content

Commit 7c622c7

Browse files
committed
Merge branch 'dev'
2 parents 5923794 + 7e7467c commit 7c622c7

File tree

8 files changed

+42
-13
lines changed

8 files changed

+42
-13
lines changed

common.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<PropertyGroup>
3-
<Version>3.8.0</Version>
3+
<Version>3.8.1</Version>
44
<NoWarn>$(NoWarn);CS1591</NoWarn>
55
<PackageIconUrl>http://www.aspnetboilerplate.com/images/abp_nupkg.png</PackageIconUrl>
66
<PackageProjectUrl>http://www.aspnetboilerplate.com/</PackageProjectUrl>

src/Abp.AspNetCore/AspNetCore/Configuration/AbpAspNetCoreConfiguration.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ public class AbpAspNetCoreConfiguration : IAbpAspNetCoreConfiguration
2626

2727
public bool SetNoCacheForAjaxResponses { get; set; }
2828

29+
public bool UseMvcDateTimeFormatForAppServices { get; set; }
30+
2931
public List<Action<IRouteBuilder>> RouteConfiguration { get; }
3032

3133
public AbpAspNetCoreConfiguration()
@@ -39,6 +41,7 @@ public AbpAspNetCoreConfiguration()
3941
IsValidationEnabledForControllers = true;
4042
SetNoCacheForAjaxResponses = true;
4143
IsAuditingEnabled = true;
44+
UseMvcDateTimeFormatForAppServices = false;
4245
}
4346

4447
public AbpControllerAssemblySettingBuilder CreateControllersForAppServices(

src/Abp.AspNetCore/AspNetCore/Configuration/IAbpAspNetCoreConfiguration.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ public interface IAbpAspNetCoreConfiguration
3333
/// Default: true.
3434
/// </summary>
3535
bool SetNoCacheForAjaxResponses { get; set; }
36-
36+
37+
/// <summary>
38+
/// Default: false.
39+
/// </summary>
40+
bool UseMvcDateTimeFormatForAppServices { get; set; }
41+
3742
/// <summary>
3843
/// Used to add route config for modules.
3944
/// </summary>

src/Abp.AspNetCore/Json/AbpMvcContractResolver.cs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
using System;
22
using System.Reflection;
3+
using Abp.AspNetCore.Configuration;
34
using Abp.Dependency;
5+
using Abp.Extensions;
46
using Abp.Reflection;
57
using Abp.Timing;
68
using Microsoft.AspNetCore.Mvc;
@@ -13,12 +15,17 @@ namespace Abp.Json
1315
public class AbpMvcContractResolver : DefaultContractResolver
1416
{
1517
private readonly IIocResolver _iocResolver;
16-
private bool _isDateTimeFormatResolved { get; set; } = false;
18+
private bool _useMvcDateTimeFormat { get; set; }
1719
private string _datetimeFormat { get; set; } = null;
1820

1921
public AbpMvcContractResolver(IIocResolver iocResolver)
2022
{
2123
_iocResolver = iocResolver;
24+
using (var configuration = _iocResolver.ResolveAsDisposable<IAbpAspNetCoreConfiguration>())
25+
{
26+
_useMvcDateTimeFormat = configuration.Object.UseMvcDateTimeFormatForAppServices;
27+
}
28+
2229
}
2330

2431
protected override JsonProperty CreateProperty(MemberInfo member, MemberSerialization memberSerialization)
@@ -42,7 +49,7 @@ protected virtual void ModifyProperty(MemberInfo member, JsonProperty property)
4249
var converter = new AbpDateTimeConverter();
4350

4451
// try to resolve MvcJsonOptions
45-
if (!_isDateTimeFormatResolved)
52+
if (_useMvcDateTimeFormat)
4653
{
4754
using (var mvcJsonOptions = _iocResolver.ResolveAsDisposable<IOptions<MvcJsonOptions>>())
4855
{
@@ -51,7 +58,7 @@ protected virtual void ModifyProperty(MemberInfo member, JsonProperty property)
5158
}
5259

5360
// apply DateTimeFormat only if not empty
54-
if (!string.IsNullOrWhiteSpace(_datetimeFormat))
61+
if (!_datetimeFormat.IsNullOrWhiteSpace())
5562
{
5663
converter.DateTimeFormat = _datetimeFormat;
5764
}

src/Abp.Castle.Log4Net/Castle/Logging/Log4Net/Log4NetLoggerFactory.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,19 @@ public Log4NetLoggerFactory()
1919
{
2020
}
2121

22-
public Log4NetLoggerFactory(string configFileName, bool reloadOnChange = false)
22+
public Log4NetLoggerFactory(string configFileName)
23+
{
24+
_loggerRepository = LogManager.CreateRepository(
25+
typeof(Log4NetLoggerFactory).GetAssembly(),
26+
typeof(log4net.Repository.Hierarchy.Hierarchy)
27+
);
28+
29+
var log4NetConfig = new XmlDocument();
30+
log4NetConfig.Load(File.OpenRead(configFileName));
31+
XmlConfigurator.Configure(_loggerRepository, log4NetConfig["log4net"]);
32+
}
33+
34+
public Log4NetLoggerFactory(string configFileName, bool reloadOnChange)
2335
{
2436
_loggerRepository = LogManager.CreateRepository(
2537
typeof(Log4NetLoggerFactory).GetAssembly(),

src/Abp.Web.Resources/Abp/Framework/scripts/abp.d.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -293,17 +293,17 @@
293293

294294
//TODO: these methods return jQuery.Promise instead of any. fix it.
295295

296-
function info(message: string, title?: string): any;
296+
function info(message: string, title?: string, isHtml?: boolean): any;
297297

298-
function success(message: string, title?: string): any;
298+
function success(message: string, title?: string, isHtml?: boolean): any;
299299

300-
function warn(message: string, title?: string): any;
300+
function warn(message: string, title?: string, isHtml?: boolean): any;
301301

302-
function error(message: string, title?: string): any;
302+
function error(message: string, title?: string, isHtml?: boolean): any;
303303

304304
function confirm(message: string, callback?: (result: boolean) => void): any;
305305

306-
function confirm(message: string, title?: string, callback?: (result: boolean) => void): any;
306+
function confirm(message: string, title?: string, callback?: (result: boolean) => void, isHtml?: boolean): any;
307307

308308
}
309309

src/Abp.ZeroCore.IdentityServer4/IdentityServer4/AbpResourceOwnerPasswordValidator.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.Security.Claims;
33
using System.Threading.Tasks;
44
using Abp.Authorization.Users;
5+
using Abp.Domain.Uow;
56
using Abp.Runtime.Security;
67
using IdentityModel;
78
using IdentityServer4.AspNetIdentity;
@@ -38,6 +39,7 @@ public AbpResourceOwnerPasswordValidator(
3839
Logger = logger;
3940
}
4041

42+
[UnitOfWork]
4143
public override async Task ValidateAsync(ResourceOwnerPasswordValidationContext context)
4244
{
4345
var user = await UserManager.FindByNameAsync(context.UserName);

src/Abp.ZeroCore/Authorization/Users/UserToken.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class UserToken : Entity<long>, IMayHaveTenant
1414
/// <summary>
1515
/// Maximum length of the <see cref="LoginProvider"/> property.
1616
/// </summary>
17-
public const int MaxLoginProviderLength = 64;
17+
public const int MaxLoginProviderLength = 128;
1818

1919
/// <summary>
2020
/// Maximum length of the <see cref="Name"/> property.
@@ -68,4 +68,4 @@ protected internal UserToken(AbpUserBase user, [NotNull] string loginProvider, [
6868
Value = value;
6969
}
7070
}
71-
}
71+
}

0 commit comments

Comments
 (0)