diff --git a/README.en.md b/README.en.md
index 8cc02ff7e..d2b620dd3 100644
--- a/README.en.md
+++ b/README.en.md
@@ -227,6 +227,15 @@ VUE_APP_CLIENT_SECRET = '1q2w3e*'
```
+### Initializes the api gateway database
+
+``` shell
+cd aspnet-core/database
+
+```
+Please use a tool such as **Navicat** to execute **apigateway-init.sql**
+
+
### Compiles background services
```shell
diff --git a/README.md b/README.md
index c1a1bb115..13f97c39c 100644
--- a/README.md
+++ b/README.md
@@ -234,6 +234,15 @@ VUE_APP_CLIENT_SECRET = '1q2w3e*'
```
+### 初始化网关数据库
+
+``` shell
+cd aspnet-core/database
+
+```
+请使用诸如**Navicat**工具执行**ApiGateway-Init.sql**
+
+
### 启动后台服务
```shell
diff --git a/aspnet-core/database/ApiGateway-Init.sql b/aspnet-core/database/ApiGateway-Init.sql
index 47e0243d6..7415c0ccb 100644
--- a/aspnet-core/database/ApiGateway-Init.sql
+++ b/aspnet-core/database/ApiGateway-Init.sql
@@ -694,7 +694,10 @@ CREATE TABLE `AppApiGatewayReRoute` (
-- ----------------------------
-- Records of AppApiGatewayReRoute
-- ----------------------------
-INSERT INTO `AppApiGatewayReRoute` VALUES (4, '{}', '430fb64b9c3949088aa32bddd86497d0', 1261299170387169280, '平台服务-权限管理', '/api/abp/permissions', '', NULL, '/api/abp/permissions', 'GET,PUT,', '', '', '', '', '', '', NULL, 1, NULL, NULL, 'HTTP', '127.0.0.1:30010,', '', NULL, NULL, NULL, 30000, 1, NULL, 'TEST-APP');
+--2020-07-02 升级abp为3.0版本,因abp已修复权限性能问题,所以抛弃自行创建的权限服务
+--为了兼容前端,修改路由下游转发地址
+INSERT INTO `AppApiGatewayReRoute` VALUES (4, '{}', '430fb64b9c3949088aa32bddd86497d0', 1261299170387169280, '平台服务-权限管理', '/api/permission-management/permissions', '', NULL, '/api/abp/permissions', 'GET,PUT,', '', '', '', '', '', '', NULL, 1, NULL, NULL, 'HTTP', '127.0.0.1:30010,', '', NULL, NULL, NULL, 30000, 1, NULL, 'TEST-APP');
+--INSERT INTO `AppApiGatewayReRoute` VALUES (4, '{}', '430fb64b9c3949088aa32bddd86497d0', 1261299170387169280, '平台服务-权限管理', '/api/abp/permissions', '', NULL, '/api/abp/permissions', 'GET,PUT,', '', '', '', '', '', '', NULL, 1, NULL, NULL, 'HTTP', '127.0.0.1:30010,', '', NULL, NULL, NULL, 30000, 1, NULL, 'TEST-APP');
INSERT INTO `AppApiGatewayReRoute` VALUES (5, '{}', '302b4871e4ba49efb39189944761d251', 1261585859064872960, '身份认证服务-客户端管理', '/api/IdentityServer/Clients', '', NULL, '/api/IdentityServer/Clients', 'POST,GET,PUT,', '', '', '', '', '', '', NULL, 1, '', NULL, 'HTTP', '127.0.0.1:30010,', '', NULL, NULL, NULL, 30000, 1, NULL, 'TEST-APP');
INSERT INTO `AppApiGatewayReRoute` VALUES (6, '{}', '4d7c360bc40342c1b1cf16181e4ac2bb', 1261586605810368512, '身份认证服务-查询客户端', '/api/IdentityServer/Clients/{Id}', '', NULL, '/api/IdentityServer/Clients/{Id}', 'GET,DELETE,', '', '', '', '', '', '', NULL, 1, NULL, NULL, 'HTTP', '127.0.0.1:30010,', '', NULL, NULL, NULL, 30000, 1, NULL, 'TEST-APP');
INSERT INTO `AppApiGatewayReRoute` VALUES (7, '{}', 'c222dcff22284b3e9ce9c424853705cd', 1261587558609436672, '服务网关管理-路由组管理', '/api/ApiGateway/RouteGroups', '', '', '/api/ApiGateway/RouteGroups', 'GET,POST,PUT,DELETE,', '', '', '', '', '', '', NULL, 1, NULL, NULL, 'HTTP', '127.0.0.1:30001,', '', NULL, '', NULL, 30000, 1, NULL, 'TEST-APP');
diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN.Abp.Account.Application.Contracts.csproj b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN.Abp.Account.Application.Contracts.csproj
index bbb2d6ffd..d8ad51ea6 100644
--- a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN.Abp.Account.Application.Contracts.csproj
+++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN.Abp.Account.Application.Contracts.csproj
@@ -6,7 +6,7 @@
-
+
diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN/Abp/Account/Dto/PasswordResetDto.cs b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN/Abp/Account/Dto/PasswordResetDto.cs
index a64affca6..899323137 100644
--- a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN/Abp/Account/Dto/PasswordResetDto.cs
+++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN/Abp/Account/Dto/PasswordResetDto.cs
@@ -1,6 +1,7 @@
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Auditing;
using Volo.Abp.Identity;
+using Volo.Abp.Validation;
namespace LINGYUN.Abp.Account
{
@@ -8,11 +9,11 @@ namespace LINGYUN.Abp.Account
{
[Required]
[Phone]
- [StringLength(IdentityUserConsts.MaxPhoneNumberLength)]
+ [DynamicStringLength(typeof(IdentityUserConsts), nameof(IdentityUserConsts.MaxPhoneNumberLength))]
public string PhoneNumber { get; set; }
[Required]
- [StringLength(IdentityUserConsts.MaxPasswordLength)]
+ [DynamicStringLength(typeof(IdentityUserConsts), nameof(IdentityUserConsts.MaxPasswordLength))]
[DataType(DataType.Password)]
[DisableAuditing]
public string NewPassword { get; set; }
diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN/Abp/Account/Dto/PhoneNumberRegisterDto.cs b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN/Abp/Account/Dto/PhoneNumberRegisterDto.cs
index cc12568bf..fed5af779 100644
--- a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN/Abp/Account/Dto/PhoneNumberRegisterDto.cs
+++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN/Abp/Account/Dto/PhoneNumberRegisterDto.cs
@@ -1,6 +1,7 @@
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Auditing;
using Volo.Abp.Identity;
+using Volo.Abp.Validation;
namespace LINGYUN.Abp.Account
{
@@ -8,21 +9,21 @@ namespace LINGYUN.Abp.Account
{
[Required]
[Phone]
- [StringLength(IdentityUserConsts.MaxPhoneNumberLength)]
+ [DynamicStringLength(typeof(IdentityUserConsts), nameof(IdentityUserConsts.MaxPhoneNumberLength))]
public string PhoneNumber { get; set; }
- [StringLength(IdentityUserConsts.MaxNameLength)]
+ [DynamicStringLength(typeof(IdentityUserConsts), nameof(IdentityUserConsts.MaxNameLength))]
public string Name { get; set; }
- [StringLength(IdentityUserConsts.MaxUserNameLength)]
+ [DynamicStringLength(typeof(IdentityUserConsts), nameof(IdentityUserConsts.MaxUserNameLength))]
public string UserName { get; set; }
[EmailAddress]
- [StringLength(IdentityUserConsts.MaxEmailLength)]
+ [DynamicStringLength(typeof(IdentityUserConsts), nameof(IdentityUserConsts.MaxEmailLength))]
public string EmailAddress { get; set; }
[Required]
- [StringLength(IdentityUserConsts.MaxPasswordLength)]
+ [DynamicStringLength(typeof(IdentityUserConsts), nameof(IdentityUserConsts.MaxPasswordLength))]
[DataType(DataType.Password)]
[DisableAuditing]
public string Password { get; set; }
diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN/Abp/Account/Dto/RegisterDto.cs b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN/Abp/Account/Dto/RegisterDto.cs
index 55a67a068..196ecce5a 100644
--- a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN/Abp/Account/Dto/RegisterDto.cs
+++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN/Abp/Account/Dto/RegisterDto.cs
@@ -1,5 +1,6 @@
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Identity;
+using Volo.Abp.Validation;
namespace LINGYUN.Abp.Account
{
@@ -7,7 +8,7 @@ namespace LINGYUN.Abp.Account
{
[Required]
[Phone]
- [StringLength(IdentityUserConsts.MaxPhoneNumberLength)]
+ [DynamicStringLength(typeof(IdentityUserConsts), nameof(IdentityUserConsts.MaxPhoneNumberLength))]
public string PhoneNumber { get; set; }
}
}
diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN/Abp/Account/Dto/VerifyDto.cs b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN/Abp/Account/Dto/VerifyDto.cs
index 03bcd2eda..7ce34f592 100644
--- a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN/Abp/Account/Dto/VerifyDto.cs
+++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN/Abp/Account/Dto/VerifyDto.cs
@@ -1,4 +1,6 @@
using System.ComponentModel.DataAnnotations;
+using Volo.Abp.Identity;
+using Volo.Abp.Validation;
namespace LINGYUN.Abp.Account
{
@@ -6,6 +8,7 @@ namespace LINGYUN.Abp.Account
{
[Required]
[Phone]
+ [DynamicStringLength(typeof(IdentityUserConsts), nameof(IdentityUserConsts.MaxPhoneNumberLength))]
public string PhoneNumber { get; set; }
[Required]
diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN/Abp/Account/Dto/WeChatRegisterDto.cs b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN/Abp/Account/Dto/WeChatRegisterDto.cs
index a0863e0d4..178ad11cd 100644
--- a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN/Abp/Account/Dto/WeChatRegisterDto.cs
+++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN/Abp/Account/Dto/WeChatRegisterDto.cs
@@ -1,6 +1,7 @@
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Auditing;
using Volo.Abp.Identity;
+using Volo.Abp.Validation;
namespace LINGYUN.Abp.Account
{
@@ -12,17 +13,17 @@ namespace LINGYUN.Abp.Account
[DisableAuditing]
[DataType(DataType.Password)]
[Required]
- [StringLength(IdentityUserConsts.MaxPasswordLength)]
+ [DynamicStringLength(typeof(IdentityUserConsts), nameof(IdentityUserConsts.MaxPasswordLength))]
public string Password { get; set; }
- [StringLength(IdentityUserConsts.MaxNameLength)]
+ [DynamicStringLength(typeof(IdentityUserConsts), nameof(IdentityUserConsts.MaxNameLength))]
public string Name { get; set; }
- [StringLength(IdentityUserConsts.MaxUserNameLength)]
+ [DynamicStringLength(typeof(IdentityUserConsts), nameof(IdentityUserConsts.MaxUserNameLength))]
public string UserName { get; set; }
[EmailAddress]
- [StringLength(IdentityUserConsts.MaxEmailLength)]
+ [DynamicStringLength(typeof(IdentityUserConsts), nameof(IdentityUserConsts.MaxEmailLength))]
public string EmailAddress { get; set; }
}
}
diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN.Abp.Account.Application.csproj b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN.Abp.Account.Application.csproj
index a9070efaf..2e6e7470b 100644
--- a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN.Abp.Account.Application.csproj
+++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN.Abp.Account.Application.csproj
@@ -6,8 +6,8 @@
-
-
+
+
diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain.Shared/LINGYUN.Abp.Account.Domain.Shared.csproj b/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain.Shared/LINGYUN.Abp.Account.Domain.Shared.csproj
index 99e8f8e0f..586eb1095 100644
--- a/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain.Shared/LINGYUN.Abp.Account.Domain.Shared.csproj
+++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain.Shared/LINGYUN.Abp.Account.Domain.Shared.csproj
@@ -6,7 +6,7 @@
-
+
diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN.Abp.Account.Domain.csproj b/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN.Abp.Account.Domain.csproj
index b34fbca1d..2598a2ee2 100644
--- a/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN.Abp.Account.Domain.csproj
+++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN.Abp.Account.Domain.csproj
@@ -16,7 +16,7 @@
-
+
diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.HttpApi/LINGYUN.Abp.Account.HttpApi.csproj b/aspnet-core/modules/account/LINGYUN.Abp.Account.HttpApi/LINGYUN.Abp.Account.HttpApi.csproj
index 6725c1982..984cdf718 100644
--- a/aspnet-core/modules/account/LINGYUN.Abp.Account.HttpApi/LINGYUN.Abp.Account.HttpApi.csproj
+++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.HttpApi/LINGYUN.Abp.Account.HttpApi.csproj
@@ -6,7 +6,7 @@
-
+
diff --git a/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN.ApiGateway.Application.Contracts.csproj b/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN.ApiGateway.Application.Contracts.csproj
index 6cb8dfaf8..91c154f6d 100644
--- a/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN.ApiGateway.Application.Contracts.csproj
+++ b/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN.ApiGateway.Application.Contracts.csproj
@@ -4,7 +4,7 @@
netstandard2.0
true
- 2.9.0
+ 3.0.0
LINGYUN
@@ -23,7 +23,7 @@
-
+
diff --git a/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/LINGYUN.ApiGateway.Application.csproj b/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/LINGYUN.ApiGateway.Application.csproj
index acb418ada..ca5a055a4 100644
--- a/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/LINGYUN.ApiGateway.Application.csproj
+++ b/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/LINGYUN.ApiGateway.Application.csproj
@@ -6,7 +6,7 @@
-
+
diff --git a/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Domain.Shared/LINGYUN.ApiGateway.Domain.Shared.csproj b/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Domain.Shared/LINGYUN.ApiGateway.Domain.Shared.csproj
index a5f697ea2..903cb62f0 100644
--- a/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Domain.Shared/LINGYUN.ApiGateway.Domain.Shared.csproj
+++ b/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Domain.Shared/LINGYUN.ApiGateway.Domain.Shared.csproj
@@ -4,7 +4,7 @@
netstandard2.0
true
- 2.9.0
+ 3.0.0
LINGYUN
@@ -23,7 +23,7 @@
-
+
diff --git a/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Domain/LINGYUN.ApiGateway.Domain.csproj b/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Domain/LINGYUN.ApiGateway.Domain.csproj
index 36fafec76..31efb7d03 100644
--- a/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Domain/LINGYUN.ApiGateway.Domain.csproj
+++ b/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Domain/LINGYUN.ApiGateway.Domain.csproj
@@ -6,8 +6,8 @@
-
-
+
+
diff --git a/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.EntityFrameworkCore/LINGYUN.ApiGateway.EntityFrameworkCore.csproj b/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.EntityFrameworkCore/LINGYUN.ApiGateway.EntityFrameworkCore.csproj
index 3a6c97777..0ddfe0fec 100644
--- a/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.EntityFrameworkCore/LINGYUN.ApiGateway.EntityFrameworkCore.csproj
+++ b/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.EntityFrameworkCore/LINGYUN.ApiGateway.EntityFrameworkCore.csproj
@@ -6,7 +6,7 @@
-
+
diff --git a/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.HttpApi.Client/LINGYUN.ApiGateway.HttpApi.Client.csproj b/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.HttpApi.Client/LINGYUN.ApiGateway.HttpApi.Client.csproj
index 52ee8fc99..3c9ae9e65 100644
--- a/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.HttpApi.Client/LINGYUN.ApiGateway.HttpApi.Client.csproj
+++ b/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.HttpApi.Client/LINGYUN.ApiGateway.HttpApi.Client.csproj
@@ -4,7 +4,7 @@
netstandard2.0
true
- 2.9.0
+ 3.0.0
LINGYUN
@@ -13,7 +13,7 @@
-
+
diff --git a/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.HttpApi/LINGYUN.ApiGateway.HttpApi.csproj b/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.HttpApi/LINGYUN.ApiGateway.HttpApi.csproj
index fc07ebac2..68608d9c0 100644
--- a/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.HttpApi/LINGYUN.ApiGateway.HttpApi.csproj
+++ b/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.HttpApi/LINGYUN.ApiGateway.HttpApi.csproj
@@ -6,7 +6,7 @@
-
+
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Aliyun.Authorization/LINGYUN.Abp.Aliyun.Authorization.csproj b/aspnet-core/modules/common/LINGYUN.Abp.Aliyun.Authorization/LINGYUN.Abp.Aliyun.Authorization.csproj
index eb9ec9cbb..2f0a6ccd7 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.Aliyun.Authorization/LINGYUN.Abp.Aliyun.Authorization.csproj
+++ b/aspnet-core/modules/common/LINGYUN.Abp.Aliyun.Authorization/LINGYUN.Abp.Aliyun.Authorization.csproj
@@ -4,7 +4,7 @@
netstandard2.0
true
- 2.9.0
+ 3.0.0
LINGYUN
@@ -13,7 +13,7 @@
-
+
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.BackgroundJobs.Hangfire/LINGYUN.Abp.BackgroundJobs.Hangfire.csproj b/aspnet-core/modules/common/LINGYUN.Abp.BackgroundJobs.Hangfire/LINGYUN.Abp.BackgroundJobs.Hangfire.csproj
index f46c407f6..50c7628ed 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.BackgroundJobs.Hangfire/LINGYUN.Abp.BackgroundJobs.Hangfire.csproj
+++ b/aspnet-core/modules/common/LINGYUN.Abp.BackgroundJobs.Hangfire/LINGYUN.Abp.BackgroundJobs.Hangfire.csproj
@@ -4,7 +4,7 @@
netstandard2.0
true
- 2.9.0
+ 3.0.0
LINGYUN
@@ -14,8 +14,8 @@
-
-
+
+
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.BackgroundJobs/LINGYUN.Abp.BackgroundJobs.csproj b/aspnet-core/modules/common/LINGYUN.Abp.BackgroundJobs/LINGYUN.Abp.BackgroundJobs.csproj
index 420f871a3..b60d1a664 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.BackgroundJobs/LINGYUN.Abp.BackgroundJobs.csproj
+++ b/aspnet-core/modules/common/LINGYUN.Abp.BackgroundJobs/LINGYUN.Abp.BackgroundJobs.csproj
@@ -4,7 +4,7 @@
netstandard2.0
true
- 2.9.0
+ 3.0.0
LINGYUN
@@ -13,7 +13,7 @@
-
+
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.BlobStoring.Aliyun/LINGYUN.Abp.BlobStoring.Aliyun.csproj b/aspnet-core/modules/common/LINGYUN.Abp.BlobStoring.Aliyun/LINGYUN.Abp.BlobStoring.Aliyun.csproj
index 92d56b011..76bc679e5 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.BlobStoring.Aliyun/LINGYUN.Abp.BlobStoring.Aliyun.csproj
+++ b/aspnet-core/modules/common/LINGYUN.Abp.BlobStoring.Aliyun/LINGYUN.Abp.BlobStoring.Aliyun.csproj
@@ -4,7 +4,7 @@
netstandard2.0
true
- 2.9.0
+ 3.0.0
LINGYUN
阿里云Oss对象存储Abp集成
@@ -15,7 +15,7 @@
-
+
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.BlobStoring.Aliyun/LINGYUN/Abp/BlobStoring/Aliyun/AliyunBlobNamingNormalizer.cs b/aspnet-core/modules/common/LINGYUN.Abp.BlobStoring.Aliyun/LINGYUN/Abp/BlobStoring/Aliyun/AliyunBlobNamingNormalizer.cs
new file mode 100644
index 000000000..707833e2c
--- /dev/null
+++ b/aspnet-core/modules/common/LINGYUN.Abp.BlobStoring.Aliyun/LINGYUN/Abp/BlobStoring/Aliyun/AliyunBlobNamingNormalizer.cs
@@ -0,0 +1,49 @@
+using System.Text.RegularExpressions;
+using Volo.Abp.BlobStoring;
+using Volo.Abp.DependencyInjection;
+
+namespace LINGYUN.Abp.BlobStoring.Aliyun
+{
+ public class AliyunBlobNamingNormalizer : IBlobNamingNormalizer, ITransientDependency
+ {
+ public virtual string NormalizeBlobName(string blobName)
+ {
+ return blobName;
+ }
+
+ ///
+ /// 阿里云BucketName命名规范
+ /// https://help.aliyun.com/document_detail/31885.html?spm=a2c4g.11186623.6.583.56081c62w6meOR
+ ///
+ ///
+ ///
+ public virtual string NormalizeContainerName(string containerName)
+ {
+ // 小写字母、数字和短划线(-)
+ containerName = containerName.ToLower();
+ containerName = Regex.Replace(containerName, "[^a-z0-9-]", string.Empty);
+
+ // 不能以短划线(-)开头
+ containerName = Regex.Replace(containerName, "^-", string.Empty);
+ // 不能以短划线(-)结尾
+ containerName = Regex.Replace(containerName, "-$", string.Empty);
+
+ // 长度必须在3-63之间
+ if (containerName.Length < 3)
+ {
+ var length = containerName.Length;
+ for (var i = 0; i < 3 - length; i++)
+ {
+ containerName += "0";
+ }
+ }
+
+ if (containerName.Length > 63)
+ {
+ containerName = containerName.Substring(0, 63);
+ }
+
+ return containerName;
+ }
+ }
+}
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.BlobStoring.Qiniu/LINGYUN.Abp.BlobStoring.Qiniu.csproj b/aspnet-core/modules/common/LINGYUN.Abp.BlobStoring.Qiniu/LINGYUN.Abp.BlobStoring.Qiniu.csproj
index 95f8bf682..ebcd78730 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.BlobStoring.Qiniu/LINGYUN.Abp.BlobStoring.Qiniu.csproj
+++ b/aspnet-core/modules/common/LINGYUN.Abp.BlobStoring.Qiniu/LINGYUN.Abp.BlobStoring.Qiniu.csproj
@@ -3,7 +3,7 @@
netstandard2.0
true
- 2.9.0
+ 3.0.0
LINGYUN
阿里云Oss对象存储Abp集成
@@ -14,7 +14,7 @@
-
+
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.DistributedLock.Redis/LINGYUN.Abp.DistributedLock.Redis.csproj b/aspnet-core/modules/common/LINGYUN.Abp.DistributedLock.Redis/LINGYUN.Abp.DistributedLock.Redis.csproj
index cf62619e3..15fce97b0 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.DistributedLock.Redis/LINGYUN.Abp.DistributedLock.Redis.csproj
+++ b/aspnet-core/modules/common/LINGYUN.Abp.DistributedLock.Redis/LINGYUN.Abp.DistributedLock.Redis.csproj
@@ -4,7 +4,7 @@
netstandard2.0
true
- 2.9.0
+ 3.0.0
@@ -12,10 +12,10 @@
-
-
+
+
-
+
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.DistributedLock/LINGYUN.Abp.DistributedLock.csproj b/aspnet-core/modules/common/LINGYUN.Abp.DistributedLock/LINGYUN.Abp.DistributedLock.csproj
index eed5083c1..7bc288946 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.DistributedLock/LINGYUN.Abp.DistributedLock.csproj
+++ b/aspnet-core/modules/common/LINGYUN.Abp.DistributedLock/LINGYUN.Abp.DistributedLock.csproj
@@ -5,7 +5,7 @@
false
true
- 2.9.0
+ 3.0.0
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN.Abp.EventBus.CAP.csproj b/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN.Abp.EventBus.CAP.csproj
index 10f6e1ae7..da0edf08a 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN.Abp.EventBus.CAP.csproj
+++ b/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN.Abp.EventBus.CAP.csproj
@@ -5,7 +5,7 @@
true
false
- 2.9.0
+ 3.0.0
Cap分布式事件总线
@@ -16,8 +16,8 @@
-
-
+
+
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.ExceptionHandling.Emailing/LINGYUN.Abp.ExceptionHandling.Emailing.csproj b/aspnet-core/modules/common/LINGYUN.Abp.ExceptionHandling.Emailing/LINGYUN.Abp.ExceptionHandling.Emailing.csproj
index 5b701f005..364bfa52a 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.ExceptionHandling.Emailing/LINGYUN.Abp.ExceptionHandling.Emailing.csproj
+++ b/aspnet-core/modules/common/LINGYUN.Abp.ExceptionHandling.Emailing/LINGYUN.Abp.ExceptionHandling.Emailing.csproj
@@ -3,7 +3,7 @@
netstandard2.0
true
- 2.9.0
+ 3.0.0
LINGYUN
@@ -26,7 +26,7 @@
-
+
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.ExceptionHandling.Emailing/LINGYUN/Abp/ExceptionHandling/Emailing/Localization/Resources/en.json b/aspnet-core/modules/common/LINGYUN.Abp.ExceptionHandling.Emailing/LINGYUN/Abp/ExceptionHandling/Emailing/Localization/Resources/en.json
index 21cf1a9d0..819e28287 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.ExceptionHandling.Emailing/LINGYUN/Abp/ExceptionHandling/Emailing/Localization/Resources/en.json
+++ b/aspnet-core/modules/common/LINGYUN.Abp.ExceptionHandling.Emailing/LINGYUN/Abp/ExceptionHandling/Emailing/Localization/Resources/en.json
@@ -1,6 +1,7 @@
{
"culture": "en",
"texts": {
+ "TextTemplate:ExceptionHandlingTemplates.SendEmail": "Apply the exception message sending template",
"SendEmailTitle": "Application exception push",
"SendEmailHeader": "Application exception"
}
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.ExceptionHandling.Emailing/LINGYUN/Abp/ExceptionHandling/Emailing/Localization/Resources/zh-Hans.json b/aspnet-core/modules/common/LINGYUN.Abp.ExceptionHandling.Emailing/LINGYUN/Abp/ExceptionHandling/Emailing/Localization/Resources/zh-Hans.json
index dbe1e8e66..3e91418ea 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.ExceptionHandling.Emailing/LINGYUN/Abp/ExceptionHandling/Emailing/Localization/Resources/zh-Hans.json
+++ b/aspnet-core/modules/common/LINGYUN.Abp.ExceptionHandling.Emailing/LINGYUN/Abp/ExceptionHandling/Emailing/Localization/Resources/zh-Hans.json
@@ -1,6 +1,7 @@
{
"culture": "zh-Hans",
"texts": {
+ "TextTemplate:ExceptionHandlingTemplates.SendEmail": "应用异常邮件发送模板",
"SendEmailTitle": "应用程序异常推送",
"SendEmailHeader": "应用程序异常"
}
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.ExceptionHandling.Notifications/LINGYUN.Abp.ExceptionHandling.Notifications.csproj b/aspnet-core/modules/common/LINGYUN.Abp.ExceptionHandling.Notifications/LINGYUN.Abp.ExceptionHandling.Notifications.csproj
index ee9b75d91..7010abec0 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.ExceptionHandling.Notifications/LINGYUN.Abp.ExceptionHandling.Notifications.csproj
+++ b/aspnet-core/modules/common/LINGYUN.Abp.ExceptionHandling.Notifications/LINGYUN.Abp.ExceptionHandling.Notifications.csproj
@@ -3,7 +3,7 @@
netstandard2.0
true
- 2.9.0
+ 3.0.0
LINGYUN
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.ExceptionHandling/LINGYUN.Abp.ExceptionHandling.csproj b/aspnet-core/modules/common/LINGYUN.Abp.ExceptionHandling/LINGYUN.Abp.ExceptionHandling.csproj
index eb9ec9cbb..2f0a6ccd7 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.ExceptionHandling/LINGYUN.Abp.ExceptionHandling.csproj
+++ b/aspnet-core/modules/common/LINGYUN.Abp.ExceptionHandling/LINGYUN.Abp.ExceptionHandling.csproj
@@ -4,7 +4,7 @@
netstandard2.0
true
- 2.9.0
+ 3.0.0
LINGYUN
@@ -13,7 +13,7 @@
-
+
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Hangfire.MySqlStorage/LINGYUN.Abp.Hangfire.Storage.MySql.csproj b/aspnet-core/modules/common/LINGYUN.Abp.Hangfire.MySqlStorage/LINGYUN.Abp.Hangfire.Storage.MySql.csproj
index 2dce503aa..9fa4e1016 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.Hangfire.MySqlStorage/LINGYUN.Abp.Hangfire.Storage.MySql.csproj
+++ b/aspnet-core/modules/common/LINGYUN.Abp.Hangfire.MySqlStorage/LINGYUN.Abp.Hangfire.Storage.MySql.csproj
@@ -5,7 +5,7 @@
false
true
- 2.9.0
+ 3.0.0
LINGYUN
LINGYUN
@@ -16,7 +16,7 @@
-
+
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Hangfire.Storage.SqlServer/LINGYUN.Abp.Hangfire.Storage.SqlServer.csproj b/aspnet-core/modules/common/LINGYUN.Abp.Hangfire.Storage.SqlServer/LINGYUN.Abp.Hangfire.Storage.SqlServer.csproj
index 9258b98dd..775cf66d2 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.Hangfire.Storage.SqlServer/LINGYUN.Abp.Hangfire.Storage.SqlServer.csproj
+++ b/aspnet-core/modules/common/LINGYUN.Abp.Hangfire.Storage.SqlServer/LINGYUN.Abp.Hangfire.Storage.SqlServer.csproj
@@ -4,7 +4,7 @@
netstandard2.0
true
- 2.9.0
+ 3.0.0
LINGYUN
@@ -14,7 +14,7 @@
-
+
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.IM.SignalR/LINGYUN.Abp.IM.SignalR.csproj b/aspnet-core/modules/common/LINGYUN.Abp.IM.SignalR/LINGYUN.Abp.IM.SignalR.csproj
index ec878f1a4..9005f017f 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.IM.SignalR/LINGYUN.Abp.IM.SignalR.csproj
+++ b/aspnet-core/modules/common/LINGYUN.Abp.IM.SignalR/LINGYUN.Abp.IM.SignalR.csproj
@@ -4,7 +4,7 @@
netcoreapp3.1
true
- 2.9.0
+ 3.0.0
@@ -12,7 +12,7 @@
-
+
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.IM/LINGYUN.Abp.IM.csproj b/aspnet-core/modules/common/LINGYUN.Abp.IM/LINGYUN.Abp.IM.csproj
index a6e3faca2..3d0f9de04 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.IM/LINGYUN.Abp.IM.csproj
+++ b/aspnet-core/modules/common/LINGYUN.Abp.IM/LINGYUN.Abp.IM.csproj
@@ -4,7 +4,7 @@
netstandard2.0
true
- 2.9.0
+ 3.0.0
@@ -12,7 +12,7 @@
-
+
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Identity.OverrideOptions/LINGYUN.Abp.Identity.OverrideOptions.csproj b/aspnet-core/modules/common/LINGYUN.Abp.Identity.OverrideOptions/LINGYUN.Abp.Identity.OverrideOptions.csproj
index 0e9f60648..5c687d60f 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.Identity.OverrideOptions/LINGYUN.Abp.Identity.OverrideOptions.csproj
+++ b/aspnet-core/modules/common/LINGYUN.Abp.Identity.OverrideOptions/LINGYUN.Abp.Identity.OverrideOptions.csproj
@@ -4,7 +4,7 @@
netstandard2.0
true
- 2.9.0
+ 3.0.0
@@ -12,7 +12,7 @@
-
+
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.IdentityServer.WeChatValidator/LINGYUN.Abp.IdentityServer.WeChatValidator.csproj b/aspnet-core/modules/common/LINGYUN.Abp.IdentityServer.WeChatValidator/LINGYUN.Abp.IdentityServer.WeChatValidator.csproj
index d87bbe6fc..8e4de463b 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.IdentityServer.WeChatValidator/LINGYUN.Abp.IdentityServer.WeChatValidator.csproj
+++ b/aspnet-core/modules/common/LINGYUN.Abp.IdentityServer.WeChatValidator/LINGYUN.Abp.IdentityServer.WeChatValidator.csproj
@@ -16,7 +16,7 @@
-
+
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Location.Baidu/LINGYUN.Abp.Location.Baidu.csproj b/aspnet-core/modules/common/LINGYUN.Abp.Location.Baidu/LINGYUN.Abp.Location.Baidu.csproj
index 277add8ca..568b8b246 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.Location.Baidu/LINGYUN.Abp.Location.Baidu.csproj
+++ b/aspnet-core/modules/common/LINGYUN.Abp.Location.Baidu/LINGYUN.Abp.Location.Baidu.csproj
@@ -4,7 +4,7 @@
netstandard2.0
false
- 2.9.0
+ 3.0.0
百度位置服务
true
@@ -25,9 +25,9 @@
-
-
-
+
+
+
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Location/LINGYUN.Abp.Location.csproj b/aspnet-core/modules/common/LINGYUN.Abp.Location/LINGYUN.Abp.Location.csproj
index c09b27d58..5001901c6 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.Location/LINGYUN.Abp.Location.csproj
+++ b/aspnet-core/modules/common/LINGYUN.Abp.Location/LINGYUN.Abp.Location.csproj
@@ -4,7 +4,7 @@
netstandard2.0
true
- 2.9.0
+ 3.0.0
位置服务
false
@@ -14,7 +14,7 @@
-
+
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications.SignalR/LINGYUN.Abp.Notifications.SignalR.csproj b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.SignalR/LINGYUN.Abp.Notifications.SignalR.csproj
index 96d5e3069..489883dd2 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.Notifications.SignalR/LINGYUN.Abp.Notifications.SignalR.csproj
+++ b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.SignalR/LINGYUN.Abp.Notifications.SignalR.csproj
@@ -4,7 +4,7 @@
netcoreapp3.1
true
- 2.9.0
+ 3.0.0
@@ -12,8 +12,8 @@
-
-
+
+
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications.WeChat/LINGYUN.Abp.Notifications.WeChat.WeApp.csproj b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.WeChat/LINGYUN.Abp.Notifications.WeChat.WeApp.csproj
index 790973e9a..683b5ee6f 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.Notifications.WeChat/LINGYUN.Abp.Notifications.WeChat.WeApp.csproj
+++ b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.WeChat/LINGYUN.Abp.Notifications.WeChat.WeApp.csproj
@@ -5,7 +5,7 @@
false
true
- 2.9.0
+ 3.0.0
通知接口的微信小程序发布者实现
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN.Abp.Notifications.csproj b/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN.Abp.Notifications.csproj
index 9af56cb36..28f6b457b 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN.Abp.Notifications.csproj
+++ b/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN.Abp.Notifications.csproj
@@ -5,7 +5,7 @@
false
true
- 2.9.0
+ 3.0.0
@@ -13,9 +13,9 @@
-
-
-
+
+
+
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.RealTime/LINGYUN.Abp.RealTime.csproj b/aspnet-core/modules/common/LINGYUN.Abp.RealTime/LINGYUN.Abp.RealTime.csproj
index 25dfe142c..5310e0807 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.RealTime/LINGYUN.Abp.RealTime.csproj
+++ b/aspnet-core/modules/common/LINGYUN.Abp.RealTime/LINGYUN.Abp.RealTime.csproj
@@ -3,7 +3,7 @@
netstandard2.0
- 2.9.0
+ 3.0.0
true
@@ -12,7 +12,7 @@
-
+
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Sms.Aliyun/LINGYUN.Abp.Sms.Aliyun.csproj b/aspnet-core/modules/common/LINGYUN.Abp.Sms.Aliyun/LINGYUN.Abp.Sms.Aliyun.csproj
index 1b84eb70e..e3f9d4375 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.Sms.Aliyun/LINGYUN.Abp.Sms.Aliyun.csproj
+++ b/aspnet-core/modules/common/LINGYUN.Abp.Sms.Aliyun/LINGYUN.Abp.Sms.Aliyun.csproj
@@ -4,7 +4,7 @@
netstandard2.0
false
- 2.9.0
+ 3.0.0
阿里云短信服务
true
@@ -25,9 +25,9 @@
-
-
-
+
+
+
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.WeChat.Authorization/LINGYUN.Abp.WeChat.Authorization.csproj b/aspnet-core/modules/common/LINGYUN.Abp.WeChat.Authorization/LINGYUN.Abp.WeChat.Authorization.csproj
index 46b1f68bd..535a56000 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.WeChat.Authorization/LINGYUN.Abp.WeChat.Authorization.csproj
+++ b/aspnet-core/modules/common/LINGYUN.Abp.WeChat.Authorization/LINGYUN.Abp.WeChat.Authorization.csproj
@@ -4,7 +4,7 @@
netstandard2.0
true
- 2.9.0
+ 3.0.0
LINGYUN
@@ -14,8 +14,8 @@
-
-
+
+
diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN.Abp.IdentityServer.Application.Contracts.csproj b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN.Abp.IdentityServer.Application.Contracts.csproj
index fc3f707e6..d00ba17ad 100644
--- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN.Abp.IdentityServer.Application.Contracts.csproj
+++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN.Abp.IdentityServer.Application.Contracts.csproj
@@ -16,8 +16,8 @@
-
-
+
+
diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/ApiResources/Dto/ApiSecretCreateDto.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/ApiResources/Dto/ApiSecretCreateDto.cs
index 733d44137..88a7a7618 100644
--- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/ApiResources/Dto/ApiSecretCreateDto.cs
+++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/ApiResources/Dto/ApiSecretCreateDto.cs
@@ -1,6 +1,7 @@
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.IdentityServer;
+using Volo.Abp.Validation;
namespace LINGYUN.Abp.IdentityServer.ApiResources
{
@@ -10,16 +11,16 @@ namespace LINGYUN.Abp.IdentityServer.ApiResources
public Guid ApiResourceId { get; set; }
[Required]
- [StringLength(SecretConsts.TypeMaxLength)]
+ [DynamicStringLength(typeof(SecretConsts), nameof(SecretConsts.TypeMaxLength))]
public string Type { get; set; }
public HashType HashType { get; set; }
[Required]
- [StringLength(SecretConsts.ValueMaxLength)]
+ [DynamicStringLength(typeof(SecretConsts), nameof(SecretConsts.ValueMaxLength))]
public string Value { get; set; }
- [StringLength(SecretConsts.DescriptionMaxLength)]
+ [DynamicStringLength(typeof(SecretConsts), nameof(SecretConsts.DescriptionMaxLength))]
public string Description { get; set; }
public DateTime? Expiration { get; set; }
diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/ApiResources/Dto/ApiSecretGetByTypeInputDto.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/ApiResources/Dto/ApiSecretGetByTypeInputDto.cs
index 273ac0b34..76b930011 100644
--- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/ApiResources/Dto/ApiSecretGetByTypeInputDto.cs
+++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/ApiResources/Dto/ApiSecretGetByTypeInputDto.cs
@@ -1,6 +1,7 @@
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.IdentityServer;
+using Volo.Abp.Validation;
namespace LINGYUN.Abp.IdentityServer.ApiResources
{
@@ -10,11 +11,11 @@ namespace LINGYUN.Abp.IdentityServer.ApiResources
public Guid ApiResourceId { get; set; }
[Required]
- [StringLength(SecretConsts.TypeMaxLength)]
+ [DynamicStringLength(typeof(SecretConsts), nameof(SecretConsts.TypeMaxLength))]
public string Type { get; set; }
[Required]
- [StringLength(SecretConsts.ValueMaxLength)]
+ [DynamicStringLength(typeof(SecretConsts), nameof(SecretConsts.ValueMaxLength))]
public string Value { get; set; }
}
}
diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientPropertyCreateDto.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientPropertyCreateDto.cs
index 23432f6ae..3d0ad345b 100644
--- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientPropertyCreateDto.cs
+++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientPropertyCreateDto.cs
@@ -1,6 +1,7 @@
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.IdentityServer.Clients;
+using Volo.Abp.Validation;
namespace LINGYUN.Abp.IdentityServer.Clients
{
@@ -10,11 +11,11 @@ namespace LINGYUN.Abp.IdentityServer.Clients
public Guid ClientId { get; set; }
[Required]
- [StringLength(ClientPropertyConsts.KeyMaxLength)]
+ [DynamicStringLength(typeof(ClientPropertyConsts), nameof(ClientPropertyConsts.KeyMaxLength))]
public string Key { get; set; }
[Required]
- [StringLength(ClientPropertyConsts.ValueMaxLength)]
+ [DynamicStringLength(typeof(ClientPropertyConsts), nameof(ClientPropertyConsts.ValueMaxLength))]
public string Value { get; set; }
}
}
diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientPropertyGetByKeyDto.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientPropertyGetByKeyDto.cs
index fdb122b99..81bfb945f 100644
--- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientPropertyGetByKeyDto.cs
+++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientPropertyGetByKeyDto.cs
@@ -1,6 +1,7 @@
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.IdentityServer.Clients;
+using Volo.Abp.Validation;
namespace LINGYUN.Abp.IdentityServer.Clients
{
@@ -10,11 +11,11 @@ namespace LINGYUN.Abp.IdentityServer.Clients
public Guid ClientId { get; set; }
[Required]
- [StringLength(ClientPropertyConsts.KeyMaxLength)]
+ [DynamicStringLength(typeof(ClientPropertyConsts), nameof(ClientPropertyConsts.KeyMaxLength))]
public string Key { get; set; }
[Required]
- [StringLength(ClientPropertyConsts.ValueMaxLength)]
+ [DynamicStringLength(typeof(ClientPropertyConsts), nameof(ClientPropertyConsts.ValueMaxLength))]
public string Value { get; set; }
}
}
diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientPropertyUpdateDto.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientPropertyUpdateDto.cs
index 778f0996b..ace028ade 100644
--- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientPropertyUpdateDto.cs
+++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientPropertyUpdateDto.cs
@@ -1,6 +1,7 @@
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.IdentityServer.Clients;
+using Volo.Abp.Validation;
namespace LINGYUN.Abp.IdentityServer.Clients
{
@@ -10,11 +11,11 @@ namespace LINGYUN.Abp.IdentityServer.Clients
public Guid ClientId { get; set; }
[Required]
- [StringLength(ClientPropertyConsts.KeyMaxLength)]
+ [DynamicStringLength(typeof(ClientPropertyConsts), nameof(ClientPropertyConsts.KeyMaxLength))]
public string Key { get; set; }
[Required]
- [StringLength(ClientPropertyConsts.ValueMaxLength)]
+ [DynamicStringLength(typeof(ClientPropertyConsts), nameof(ClientPropertyConsts.ValueMaxLength))]
public string Value { get; set; }
}
}
diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientSecretCreateDto.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientSecretCreateDto.cs
index e4fb660e4..7d00a26bc 100644
--- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientSecretCreateDto.cs
+++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientSecretCreateDto.cs
@@ -1,6 +1,7 @@
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.IdentityServer;
+using Volo.Abp.Validation;
namespace LINGYUN.Abp.IdentityServer.Clients
{
@@ -10,16 +11,16 @@ namespace LINGYUN.Abp.IdentityServer.Clients
public Guid ClientId { get; set; }
[Required]
- [StringLength(SecretConsts.TypeMaxLength)]
+ [DynamicStringLength(typeof(SecretConsts), nameof(SecretConsts.TypeMaxLength))]
public string Type { get; set; }
public HashType HashType { get; set; }
[Required]
- [StringLength(SecretConsts.ValueMaxLength)]
+ [DynamicStringLength(typeof(SecretConsts), nameof(SecretConsts.ValueMaxLength))]
public string Value { get; set; }
- [StringLength(SecretConsts.DescriptionMaxLength)]
+ [DynamicStringLength(typeof(SecretConsts), nameof(SecretConsts.DescriptionMaxLength))]
public string Description { get; set; }
public DateTime? Expiration { get; set; }
diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientSecretGetByTypeDto.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientSecretGetByTypeDto.cs
index 5b5edc85f..607b00aee 100644
--- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientSecretGetByTypeDto.cs
+++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientSecretGetByTypeDto.cs
@@ -1,6 +1,7 @@
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.IdentityServer;
+using Volo.Abp.Validation;
namespace LINGYUN.Abp.IdentityServer.Clients
{
@@ -10,11 +11,11 @@ namespace LINGYUN.Abp.IdentityServer.Clients
public Guid ClientId { get; set; }
[Required]
- [StringLength(SecretConsts.TypeMaxLength)]
+ [DynamicStringLength(typeof(SecretConsts), nameof(SecretConsts.TypeMaxLength))]
public string Type { get; set; }
[Required]
- [StringLength(SecretConsts.ValueMaxLength)]
+ [DynamicStringLength(typeof(SecretConsts), nameof(SecretConsts.ValueMaxLength))]
public string Value { get; set; }
}
}
diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientSecretUpdateDto.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientSecretUpdateDto.cs
index 3d2096544..93bb12cfa 100644
--- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientSecretUpdateDto.cs
+++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientSecretUpdateDto.cs
@@ -1,6 +1,7 @@
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.IdentityServer;
+using Volo.Abp.Validation;
namespace LINGYUN.Abp.IdentityServer.Clients
{
@@ -10,16 +11,16 @@ namespace LINGYUN.Abp.IdentityServer.Clients
public Guid ClientId { get; set; }
[Required]
- [StringLength(SecretConsts.TypeMaxLength)]
+ [DynamicStringLength(typeof(SecretConsts), nameof(SecretConsts.TypeMaxLength))]
public string Type { get; set; }
public HashType HashType { get; set; }
[Required]
- [StringLength(SecretConsts.ValueMaxLength)]
+ [DynamicStringLength(typeof(SecretConsts), nameof(SecretConsts.ValueMaxLength))]
public string Value { get; set; }
- [StringLength(SecretConsts.DescriptionMaxLength)]
+ [DynamicStringLength(typeof(SecretConsts), nameof(SecretConsts.DescriptionMaxLength))]
public string Description { get; set; }
public DateTime? Expiration { get; set; }
diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/IdentityResources/Dto/IdentityResourceCreateDto.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/IdentityResources/Dto/IdentityResourceCreateDto.cs
index efb8f9278..6e3479d70 100644
--- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/IdentityResources/Dto/IdentityResourceCreateDto.cs
+++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/IdentityResources/Dto/IdentityResourceCreateDto.cs
@@ -1,19 +1,20 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.IdentityServer.IdentityResources;
+using Volo.Abp.Validation;
namespace LINGYUN.Abp.IdentityServer.IdentityResources
{
public class IdentityResourceCreateDto
{
[Required]
- [StringLength(IdentityResourceConsts.NameMaxLength)]
+ [DynamicStringLength(typeof(IdentityResourceConsts), nameof(IdentityResourceConsts.NameMaxLength))]
public string Name { get; set; }
- [StringLength(IdentityResourceConsts.DisplayNameMaxLength)]
+ [DynamicStringLength(typeof(IdentityResourceConsts), nameof(IdentityResourceConsts.DisplayNameMaxLength))]
public string DisplayName { get; set; }
- [StringLength(IdentityResourceConsts.DescriptionMaxLength)]
+ [DynamicStringLength(typeof(IdentityResourceConsts), nameof(IdentityResourceConsts.DescriptionMaxLength))]
public string Description { get; set; }
public bool Enabled { get; set; }
diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/IdentityResources/Dto/IdentityResourceUpdateDto.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/IdentityResources/Dto/IdentityResourceUpdateDto.cs
index 5a9d4e18a..0d5e46ed6 100644
--- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/IdentityResources/Dto/IdentityResourceUpdateDto.cs
+++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/IdentityResources/Dto/IdentityResourceUpdateDto.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.IdentityServer.IdentityResources;
+using Volo.Abp.Validation;
namespace LINGYUN.Abp.IdentityServer.IdentityResources
{
@@ -14,13 +15,13 @@ namespace LINGYUN.Abp.IdentityServer.IdentityResources
[StringLength(2000)]
public string ConcurrencyStamp { get; set; }
- [StringLength(IdentityResourceConsts.NameMaxLength)]
+ [DynamicStringLength(typeof(IdentityResourceConsts), nameof(IdentityResourceConsts.NameMaxLength))]
public string Name { get; set; }
- [StringLength(IdentityResourceConsts.DisplayNameMaxLength)]
+ [DynamicStringLength(typeof(IdentityResourceConsts), nameof(IdentityResourceConsts.DisplayNameMaxLength))]
public string DisplayName { get; set; }
- [StringLength(IdentityResourceConsts.DescriptionMaxLength)]
+ [DynamicStringLength(typeof(IdentityResourceConsts), nameof(IdentityResourceConsts.DescriptionMaxLength))]
public string Description { get; set; }
public bool Enabled { get; set; }
diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN.Abp.IdentityServer.Application.csproj b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN.Abp.IdentityServer.Application.csproj
index eac54b786..d60a5469f 100644
--- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN.Abp.IdentityServer.Application.csproj
+++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN.Abp.IdentityServer.Application.csproj
@@ -6,7 +6,7 @@
-
+
diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN.Abp.IdentityServer.HttpApi.csproj b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN.Abp.IdentityServer.HttpApi.csproj
index 24db66037..190aa9495 100644
--- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN.Abp.IdentityServer.HttpApi.csproj
+++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN.Abp.IdentityServer.HttpApi.csproj
@@ -6,7 +6,7 @@
-
+
diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.SmsValidator/LINGYUN.Abp.IdentityServer.SmsValidator.csproj b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.SmsValidator/LINGYUN.Abp.IdentityServer.SmsValidator.csproj
index 04ede37ff..f34d1b0a9 100644
--- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.SmsValidator/LINGYUN.Abp.IdentityServer.SmsValidator.csproj
+++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.SmsValidator/LINGYUN.Abp.IdentityServer.SmsValidator.csproj
@@ -16,7 +16,7 @@
-
+
diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Application.Contracts/LINGYUN.Abp.MessageService.Application.Contracts.csproj b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Application.Contracts/LINGYUN.Abp.MessageService.Application.Contracts.csproj
index 7dd324638..bc091984e 100644
--- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Application.Contracts/LINGYUN.Abp.MessageService.Application.Contracts.csproj
+++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Application.Contracts/LINGYUN.Abp.MessageService.Application.Contracts.csproj
@@ -4,7 +4,7 @@
netstandard2.0
true
- 2.9.0
+ 3.0.0
LINGYUN
@@ -14,8 +14,8 @@
-
-
+
+
diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Application/LINGYUN.Abp.MessageService.Application.csproj b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Application/LINGYUN.Abp.MessageService.Application.csproj
index 4d65e3c0e..be6acbb83 100644
--- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Application/LINGYUN.Abp.MessageService.Application.csproj
+++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Application/LINGYUN.Abp.MessageService.Application.csproj
@@ -4,7 +4,7 @@
netstandard2.0
true
- 2.9.0
+ 3.0.0
LINGYUN
@@ -14,7 +14,7 @@
-
+
diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain.Shared/LINGYUN.Abp.MessageService.Domain.Shared.csproj b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain.Shared/LINGYUN.Abp.MessageService.Domain.Shared.csproj
index 8d337c0be..f61966381 100644
--- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain.Shared/LINGYUN.Abp.MessageService.Domain.Shared.csproj
+++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain.Shared/LINGYUN.Abp.MessageService.Domain.Shared.csproj
@@ -4,7 +4,7 @@
netstandard2.0
true
- 2.9.0
+ 3.0.0
LINGYUN
@@ -13,7 +13,7 @@
-
+
diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN.Abp.MessageService.Domain.csproj b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN.Abp.MessageService.Domain.csproj
index 576b98e94..df8c0576c 100644
--- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN.Abp.MessageService.Domain.csproj
+++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN.Abp.MessageService.Domain.csproj
@@ -4,7 +4,7 @@
netstandard2.0
true
- 2.9.0
+ 3.0.0
LINGYUN
@@ -23,10 +23,10 @@
-
-
-
-
+
+
+
+
diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.EntityFrameworkCore/LINGYUN.Abp.MessageService.EntityFrameworkCore.csproj b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.EntityFrameworkCore/LINGYUN.Abp.MessageService.EntityFrameworkCore.csproj
index 57518a766..418e27570 100644
--- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.EntityFrameworkCore/LINGYUN.Abp.MessageService.EntityFrameworkCore.csproj
+++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.EntityFrameworkCore/LINGYUN.Abp.MessageService.EntityFrameworkCore.csproj
@@ -5,7 +5,7 @@
false
true
- 2.9.0
+ 3.0.0
LINGYUN
@@ -14,7 +14,7 @@
-
+
diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.HttpApi.Client/LINGYUN.Abp.MessageService.HttpApi.Client.csproj b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.HttpApi.Client/LINGYUN.Abp.MessageService.HttpApi.Client.csproj
index 1ae461b35..44bb6768c 100644
--- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.HttpApi.Client/LINGYUN.Abp.MessageService.HttpApi.Client.csproj
+++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.HttpApi.Client/LINGYUN.Abp.MessageService.HttpApi.Client.csproj
@@ -4,7 +4,7 @@
netcoreapp3.1
true
- 2.9.0
+ 3.0.0
LINGYUN
@@ -13,7 +13,7 @@
-
+
diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN.Abp.MessageService.HttpApi.csproj b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN.Abp.MessageService.HttpApi.csproj
index bc850f198..fb9d1b63d 100644
--- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN.Abp.MessageService.HttpApi.csproj
+++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN.Abp.MessageService.HttpApi.csproj
@@ -6,7 +6,7 @@
-
+
diff --git a/aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Application.Contracts/LINGYUN.Abp.PermissionManagement.Application.Contracts.csproj b/aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Application.Contracts/LINGYUN.Abp.PermissionManagement.Application.Contracts.csproj
index 05b157138..53901c64a 100644
--- a/aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Application.Contracts/LINGYUN.Abp.PermissionManagement.Application.Contracts.csproj
+++ b/aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Application.Contracts/LINGYUN.Abp.PermissionManagement.Application.Contracts.csproj
@@ -6,8 +6,8 @@
-
-
+
+
diff --git a/aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Application/LINGYUN.Abp.PermissionManagement.Application.csproj b/aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Application/LINGYUN.Abp.PermissionManagement.Application.csproj
index 0230360fb..e47b647db 100644
--- a/aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Application/LINGYUN.Abp.PermissionManagement.Application.csproj
+++ b/aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Application/LINGYUN.Abp.PermissionManagement.Application.csproj
@@ -6,8 +6,8 @@
-
-
+
+
diff --git a/aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Application/LINGYUN/Abp/PermissionManagement/PermissionAppService.cs b/aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Application/LINGYUN/Abp/PermissionManagement/PermissionAppService.cs
index 565bd2d23..84694d1c8 100644
--- a/aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Application/LINGYUN/Abp/PermissionManagement/PermissionAppService.cs
+++ b/aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Application/LINGYUN/Abp/PermissionManagement/PermissionAppService.cs
@@ -132,7 +132,7 @@ namespace LINGYUN.Abp.PermissionManagement
}
// 同步变更缓存里的权限配置
var cacheKey = CalculateCacheKey(permission.Name, providerName, providerKey);
- var cacheItem = new PermissionGrantCacheItem(permission.Name, permission.IsGranted);
+ var cacheItem = new PermissionGrantCacheItem(permission.IsGranted);
await Cache.SetAsync(cacheKey, cacheItem);
}
}
diff --git a/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN.Abp.SettingManagement.Application.Contracts.csproj b/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN.Abp.SettingManagement.Application.Contracts.csproj
index baf88ac49..7278bc9c9 100644
--- a/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN.Abp.SettingManagement.Application.Contracts.csproj
+++ b/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN.Abp.SettingManagement.Application.Contracts.csproj
@@ -16,8 +16,8 @@
-
-
+
+
diff --git a/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN/Abp/SettingManagement/Dto/UpdateSettingDto.cs b/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN/Abp/SettingManagement/Dto/UpdateSettingDto.cs
index 9eb1f0ec6..d568b4447 100644
--- a/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN/Abp/SettingManagement/Dto/UpdateSettingDto.cs
+++ b/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN/Abp/SettingManagement/Dto/UpdateSettingDto.cs
@@ -1,8 +1,16 @@
-namespace LINGYUN.Abp.SettingManagement
+using System.ComponentModel.DataAnnotations;
+using Volo.Abp.SettingManagement;
+using Volo.Abp.Validation;
+
+namespace LINGYUN.Abp.SettingManagement
{
public class UpdateSettingDto
{
+ [Required]
+ [DynamicStringLength(typeof(SettingConsts), nameof(SettingConsts.MaxNameLength))]
public string Name { get; set; }
+
+ [DynamicStringLength(typeof(SettingConsts), nameof(SettingConsts.MaxValueLength))]
public string Value { get; set; }
}
}
diff --git a/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application/LINGYUN.Abp.SettingManagement.Application.csproj b/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application/LINGYUN.Abp.SettingManagement.Application.csproj
index 1554fb551..2466d2036 100644
--- a/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application/LINGYUN.Abp.SettingManagement.Application.csproj
+++ b/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application/LINGYUN.Abp.SettingManagement.Application.csproj
@@ -5,7 +5,7 @@
-
+
diff --git a/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.HttpApi/LINGYUN.Abp.SettingManagement.HttpApi.csproj b/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.HttpApi/LINGYUN.Abp.SettingManagement.HttpApi.csproj
index 439c131aa..6e302e599 100644
--- a/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.HttpApi/LINGYUN.Abp.SettingManagement.HttpApi.csproj
+++ b/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.HttpApi/LINGYUN.Abp.SettingManagement.HttpApi.csproj
@@ -5,7 +5,7 @@
-
+
diff --git a/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN.Abp.MultiTenancy.DbFinder.csproj b/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN.Abp.MultiTenancy.DbFinder.csproj
index d73ac691a..26b285f3c 100644
--- a/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN.Abp.MultiTenancy.DbFinder.csproj
+++ b/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN.Abp.MultiTenancy.DbFinder.csproj
@@ -4,7 +4,7 @@
netstandard2.0
true
- 2.9.0
+ 3.0.0
LINGYUN
@@ -14,8 +14,8 @@
-
-
+
+
diff --git a/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN/Abp/MultiTenancy/DbFinder/TenantStore.cs b/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN/Abp/MultiTenancy/DbFinder/TenantStore.cs
index 3246f451a..b42114d7c 100644
--- a/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN/Abp/MultiTenancy/DbFinder/TenantStore.cs
+++ b/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN/Abp/MultiTenancy/DbFinder/TenantStore.cs
@@ -19,14 +19,16 @@ namespace LINGYUN.Abp.MultiTenancy.DbFinder
{
public ILogger Logger { protected get; set; }
private readonly IDistributedCache _cache;
-
+ private readonly IDataFilter _dataFilter;
private readonly ITenantRepository _tenantRepository;
public TenantStore(
+ IDataFilter dataFilter,
ITenantRepository tenantRepository,
IDistributedCache cache)
{
_cache = cache;
+ _dataFilter = dataFilter;
_tenantRepository = tenantRepository;
Logger = NullLogger.Instance;
@@ -89,24 +91,28 @@ namespace LINGYUN.Abp.MultiTenancy.DbFinder
}
Logger.LogDebug($"Not found in the cache, getting from the repository: {cacheKey}");
- var tenant = await _tenantRepository.FindAsync(id, true);
- if (tenant == null)
- {
- Logger.LogWarning($"Can not found tenant by id: {id}");
- throw new AbpException($"Can not found tenant by id: {id}");
- }
- var connectionStrings = new ConnectionStrings();
- foreach (var tenantConnectionString in tenant.ConnectionStrings)
+ // 禁用租户过滤器
+ using (_dataFilter.Disable())
{
- connectionStrings[tenantConnectionString.Name] = tenantConnectionString.Value;
- }
- cacheItem = new TenantConfigurationCacheItem(tenant.Id, tenant.Name, connectionStrings);
+ var tenant = await _tenantRepository.FindAsync(id, true);
+ if (tenant == null)
+ {
+ Logger.LogWarning($"Can not found tenant by id: {id}");
+ throw new AbpException($"Can not found tenant by id: {id}");
+ }
+ var connectionStrings = new ConnectionStrings();
+ foreach (var tenantConnectionString in tenant.ConnectionStrings)
+ {
+ connectionStrings[tenantConnectionString.Name] = tenantConnectionString.Value;
+ }
+ cacheItem = new TenantConfigurationCacheItem(tenant.Id, tenant.Name, connectionStrings);
+
+ Logger.LogDebug($"Setting the cache item: {cacheKey}");
+ await _cache.SetAsync(cacheKey, cacheItem);
+ Logger.LogDebug($"Finished setting the cache item: {cacheKey}");
- Logger.LogDebug($"Setting the cache item: {cacheKey}");
- await _cache.SetAsync(cacheKey, cacheItem);
- Logger.LogDebug($"Finished setting the cache item: {cacheKey}");
-
- return cacheItem;
+ return cacheItem;
+ }
}
protected virtual async Task GetCacheItemByNameAsync(string name)
{
@@ -123,24 +129,27 @@ namespace LINGYUN.Abp.MultiTenancy.DbFinder
}
Logger.LogDebug($"Not found in the cache, getting from the repository: {cacheKey}");
- var tenant = await _tenantRepository.FindByNameAsync(name);
- if (tenant == null)
+ using (_dataFilter.Disable())
{
- Logger.LogWarning($"Can not found tenant by name: {name}");
- throw new AbpException($"Can not found tenant by name: {name}");
- }
- var connectionStrings = new ConnectionStrings();
- foreach (var tenantConnectionString in tenant.ConnectionStrings)
- {
- connectionStrings[tenantConnectionString.Name] = tenantConnectionString.Value;
- }
- cacheItem = new TenantConfigurationCacheItem(tenant.Id, tenant.Name, connectionStrings);
+ var tenant = await _tenantRepository.FindByNameAsync(name);
+ if (tenant == null)
+ {
+ Logger.LogWarning($"Can not found tenant by name: {name}");
+ throw new AbpException($"Can not found tenant by name: {name}");
+ }
+ var connectionStrings = new ConnectionStrings();
+ foreach (var tenantConnectionString in tenant.ConnectionStrings)
+ {
+ connectionStrings[tenantConnectionString.Name] = tenantConnectionString.Value;
+ }
+ cacheItem = new TenantConfigurationCacheItem(tenant.Id, tenant.Name, connectionStrings);
+
+ Logger.LogDebug($"Setting the cache item: {cacheKey}");
+ await _cache.SetAsync(cacheKey, cacheItem);
+ Logger.LogDebug($"Finished setting the cache item: {cacheKey}");
- Logger.LogDebug($"Setting the cache item: {cacheKey}");
- await _cache.SetAsync(cacheKey, cacheItem);
- Logger.LogDebug($"Finished setting the cache item: {cacheKey}");
-
- return cacheItem;
+ return cacheItem;
+ }
}
}
}
diff --git a/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/README.md b/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/README.md
index 0660b9bdd..943581855 100644
--- a/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/README.md
+++ b/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/README.md
@@ -12,10 +12,10 @@ abp 多租户数据库查询组件,引用此模块将首先从分布式缓存查
``` shell
// .NET CLI
- dotnet add package Volo.Abp.TenantManagement.EntityFrameworkCore --version 2.9.0
+ dotnet add package Volo.Abp.TenantManagement.EntityFrameworkCore --version 3.0.0
// Package Manager
-Install-Package Volo.Abp.TenantManagement.EntityFrameworkCore -Version 2.9.0
+Install-Package Volo.Abp.TenantManagement.EntityFrameworkCore -Version 3.0.0
```
diff --git a/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN.Abp.MultiTenancy.RemoteService.csproj b/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN.Abp.MultiTenancy.RemoteService.csproj
index 73b82b7f5..0470e915e 100644
--- a/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN.Abp.MultiTenancy.RemoteService.csproj
+++ b/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN.Abp.MultiTenancy.RemoteService.csproj
@@ -4,7 +4,7 @@
netstandard2.0
true
- 2.9.0
+ 3.0.0
LINGYUN
@@ -14,7 +14,7 @@
-
+
diff --git a/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN/Abp/MultiTenancy/RemoteService/TenantStore.cs b/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN/Abp/MultiTenancy/RemoteService/TenantStore.cs
index 65abf5ca0..32fc9d73b 100644
--- a/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN/Abp/MultiTenancy/RemoteService/TenantStore.cs
+++ b/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN/Abp/MultiTenancy/RemoteService/TenantStore.cs
@@ -3,14 +3,11 @@ using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using System;
-using System.Collections.Generic;
-using System.Linq;
using System.Threading.Tasks;
using Volo.Abp.Caching;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.MultiTenancy;
-using Volo.Abp.ObjectMapping;
using Volo.Abp.Threading;
namespace LINGYUN.Abp.MultiTenancy.RemoteService
@@ -21,55 +18,69 @@ namespace LINGYUN.Abp.MultiTenancy.RemoteService
{
public ILogger Logger { protected get; set; }
private readonly IDistributedCache _cache;
-
+ private readonly ICurrentTenant _currentTenant;
private readonly ITenantAppService _tenantAppService;
public TenantStore(
+ ICurrentTenant currentTenant,
ITenantAppService tenantAppService,
IDistributedCache cache)
{
_cache = cache;
+ _currentTenant = currentTenant;
_tenantAppService = tenantAppService;
Logger = NullLogger.Instance;
}
public virtual TenantConfiguration Find(string name)
{
- var tenantCacheItem = AsyncHelper.RunSync(async () => await
+ using (_currentTenant.Change(null))
+ {
+ var tenantCacheItem = AsyncHelper.RunSync(async () => await
GetCacheItemByNameAsync(name));
- return new TenantConfiguration(tenantCacheItem.Id, tenantCacheItem.Name)
- {
- ConnectionStrings = tenantCacheItem.ConnectionStrings
- };
+ return new TenantConfiguration(tenantCacheItem.Id, tenantCacheItem.Name)
+ {
+ ConnectionStrings = tenantCacheItem.ConnectionStrings
+ };
+ }
}
public virtual TenantConfiguration Find(Guid id)
{
- var tenantCacheItem = AsyncHelper.RunSync(async () => await
- GetCacheItemByIdAsync(id));
-
- return new TenantConfiguration(tenantCacheItem.Id, tenantCacheItem.Name)
+ using (_currentTenant.Change(null))
{
- ConnectionStrings = tenantCacheItem.ConnectionStrings
- };
+ var tenantCacheItem = AsyncHelper.RunSync(async () => await
+ GetCacheItemByIdAsync(id));
+
+ return new TenantConfiguration(tenantCacheItem.Id, tenantCacheItem.Name)
+ {
+ ConnectionStrings = tenantCacheItem.ConnectionStrings
+ };
+ }
}
public virtual async Task FindAsync(string name)
{
- var tenantCacheItem = await GetCacheItemByNameAsync(name);
- return new TenantConfiguration(tenantCacheItem.Id, tenantCacheItem.Name)
+ using (_currentTenant.Change(null))
{
- ConnectionStrings = tenantCacheItem.ConnectionStrings
- };
+ var tenantCacheItem = await GetCacheItemByNameAsync(name);
+ return new TenantConfiguration(tenantCacheItem.Id, tenantCacheItem.Name)
+ {
+ ConnectionStrings = tenantCacheItem.ConnectionStrings
+ };
+ }
}
public virtual async Task FindAsync(Guid id)
{
- var tenantCacheItem = await GetCacheItemByIdAsync(id);
- return new TenantConfiguration(tenantCacheItem.Id, tenantCacheItem.Name)
+ using (_currentTenant.Change(null))
{
- ConnectionStrings = tenantCacheItem.ConnectionStrings
- };
+ var tenantCacheItem = await GetCacheItemByIdAsync(id);
+ return new TenantConfiguration(tenantCacheItem.Id, tenantCacheItem.Name)
+ {
+ ConnectionStrings = tenantCacheItem.ConnectionStrings
+ };
+ }
}
protected virtual async Task GetCacheItemByIdAsync(Guid id)
diff --git a/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/README.md b/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/README.md
index 8b0cf4f65..b488762e1 100644
--- a/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/README.md
+++ b/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/README.md
@@ -12,10 +12,10 @@ abp 多租户远程服务组件,引用此模块将首先从分布式缓存查询
``` shell
// .NET CLI
- dotnet add package Volo.Abp.Http.Client.IdentityModel --version 2.9.0
+ dotnet add package Volo.Abp.Http.Client.IdentityModel --version 3.0.0
// Package Manager
-Install-Package Volo.Abp.Http.Client.IdentityModel -Version 2.9.0
+Install-Package Volo.Abp.Http.Client.IdentityModel -Version 3.0.0
```
diff --git a/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN.Abp.TenantManagement.Application.Contracts.csproj b/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN.Abp.TenantManagement.Application.Contracts.csproj
index 95f2f3261..7aa28ffcb 100644
--- a/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN.Abp.TenantManagement.Application.Contracts.csproj
+++ b/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN.Abp.TenantManagement.Application.Contracts.csproj
@@ -4,7 +4,7 @@
netstandard2.0
true
- 2.9.0
+ 3.0.0
LINGYUN
@@ -24,8 +24,8 @@
-
-
+
+
diff --git a/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN/Abp/TenantManagement/Dto/TenantConnectionGetByNameInputDto.cs b/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN/Abp/TenantManagement/Dto/TenantConnectionGetByNameInputDto.cs
index 239af7d76..7131abda6 100644
--- a/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN/Abp/TenantManagement/Dto/TenantConnectionGetByNameInputDto.cs
+++ b/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN/Abp/TenantManagement/Dto/TenantConnectionGetByNameInputDto.cs
@@ -1,6 +1,7 @@
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.TenantManagement;
+using Volo.Abp.Validation;
namespace LINGYUN.Abp.TenantManagement
{
@@ -10,7 +11,7 @@ namespace LINGYUN.Abp.TenantManagement
public Guid Id { get; set; }
[Required]
- [StringLength(TenantConnectionStringConsts.MaxNameLength)]
+ [DynamicStringLength(typeof(TenantConnectionStringConsts), nameof(TenantConnectionStringConsts.MaxNameLength))]
public string Name { get; set; }
}
}
diff --git a/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN/Abp/TenantManagement/Dto/TenantConnectionStringCreateOrUpdateDto.cs b/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN/Abp/TenantManagement/Dto/TenantConnectionStringCreateOrUpdateDto.cs
index 9de0af52f..22869a29a 100644
--- a/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN/Abp/TenantManagement/Dto/TenantConnectionStringCreateOrUpdateDto.cs
+++ b/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN/Abp/TenantManagement/Dto/TenantConnectionStringCreateOrUpdateDto.cs
@@ -1,17 +1,18 @@
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.TenantManagement;
+using Volo.Abp.Validation;
namespace LINGYUN.Abp.TenantManagement
{
public class TenantConnectionStringCreateOrUpdateDto
{
[Required]
- [StringLength(TenantConnectionStringConsts.MaxNameLength)]
+ [DynamicStringLength(typeof(TenantConnectionStringConsts), nameof(TenantConnectionStringConsts.MaxNameLength))]
public string Name { get; set; }
[Required]
- [StringLength(TenantConnectionStringConsts.MaxValueLength)]
+ [DynamicStringLength(typeof(TenantConnectionStringConsts), nameof(TenantConnectionStringConsts.MaxValueLength))]
public string Value { get; set; }
}
}
diff --git a/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN/Abp/TenantManagement/Dto/TenantCreateOrUpdateDtoBase.cs b/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN/Abp/TenantManagement/Dto/TenantCreateOrUpdateDtoBase.cs
index 19b8877c0..87e167779 100644
--- a/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN/Abp/TenantManagement/Dto/TenantCreateOrUpdateDtoBase.cs
+++ b/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN/Abp/TenantManagement/Dto/TenantCreateOrUpdateDtoBase.cs
@@ -1,13 +1,15 @@
using System.ComponentModel.DataAnnotations;
using Volo.Abp.ObjectExtending;
using Volo.Abp.TenantManagement;
+using Volo.Abp.Validation;
namespace LINGYUN.Abp.TenantManagement
{
public abstract class TenantCreateOrUpdateDtoBase : ExtensibleObject
{
[Required]
- [StringLength(TenantConsts.MaxNameLength)]
+ [DynamicStringLength(typeof(TenantConsts), nameof(TenantConsts.MaxNameLength))]
+
public string Name { get; set; }
}
}
\ No newline at end of file
diff --git a/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN/Abp/TenantManagement/Dto/TenantGetByNameInputDto.cs b/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN/Abp/TenantManagement/Dto/TenantGetByNameInputDto.cs
index 1c79cc41c..510b5e950 100644
--- a/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN/Abp/TenantManagement/Dto/TenantGetByNameInputDto.cs
+++ b/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN/Abp/TenantManagement/Dto/TenantGetByNameInputDto.cs
@@ -1,12 +1,13 @@
using System.ComponentModel.DataAnnotations;
using Volo.Abp.TenantManagement;
+using Volo.Abp.Validation;
namespace LINGYUN.Abp.TenantManagement
{
public class TenantGetByNameInputDto
{
[Required]
- [StringLength(TenantConsts.MaxNameLength)]
+ [DynamicStringLength(typeof(TenantConsts), nameof(TenantConsts.MaxNameLength))]
public string Name { get; set; }
public TenantGetByNameInputDto() { }
diff --git a/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application/LINGYUN.Abp.TenantManagement.Application.csproj b/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application/LINGYUN.Abp.TenantManagement.Application.csproj
index 2cd39b192..84c613aed 100644
--- a/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application/LINGYUN.Abp.TenantManagement.Application.csproj
+++ b/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application/LINGYUN.Abp.TenantManagement.Application.csproj
@@ -6,7 +6,7 @@
-
+
diff --git a/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.HttpApi.Client/LINGYUN.Abp.TenantManagement.HttpApi.Client.csproj b/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.HttpApi.Client/LINGYUN.Abp.TenantManagement.HttpApi.Client.csproj
index 7ece2b666..153e584d1 100644
--- a/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.HttpApi.Client/LINGYUN.Abp.TenantManagement.HttpApi.Client.csproj
+++ b/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.HttpApi.Client/LINGYUN.Abp.TenantManagement.HttpApi.Client.csproj
@@ -4,7 +4,7 @@
netstandard2.0
true
- 2.9.0
+ 3.0.0
LINGYUN
@@ -14,7 +14,7 @@
-
+
diff --git a/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.HttpApi/LINGYUN.Abp.TenantManagement.HttpApi.csproj b/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.HttpApi/LINGYUN.Abp.TenantManagement.HttpApi.csproj
index ea4bb4399..f6d097bd1 100644
--- a/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.HttpApi/LINGYUN.Abp.TenantManagement.HttpApi.csproj
+++ b/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.HttpApi/LINGYUN.Abp.TenantManagement.HttpApi.csproj
@@ -6,7 +6,7 @@
-
+
diff --git a/aspnet-core/services/account/AuthServer.Host/AuthIdentityServerModule.cs b/aspnet-core/services/account/AuthServer.Host/AuthIdentityServerModule.cs
index 46e1eaa28..eac5bbf90 100644
--- a/aspnet-core/services/account/AuthServer.Host/AuthIdentityServerModule.cs
+++ b/aspnet-core/services/account/AuthServer.Host/AuthIdentityServerModule.cs
@@ -1,16 +1,13 @@
using DotNetCore.CAP;
using LINGYUN.Abp.EventBus.CAP;
-using LINGYUN.Abp.Identity;
using LINGYUN.Abp.IdentityServer;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.Hosting;
-using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
-using Microsoft.Extensions.Options;
using StackExchange.Redis;
using System;
using System.Linq;
@@ -49,8 +46,7 @@ namespace AuthServer.Host
typeof(AbpIdentityServerEntityFrameworkCoreModule),
typeof(AbpSettingManagementEntityFrameworkCoreModule),
typeof(AbpTenantManagementEntityFrameworkCoreModule),
- typeof(AbpPermissionManagementEntityFrameworkCoreModule),
- typeof(AbpIdentityOverrideOptionsModule)
+ typeof(AbpPermissionManagementEntityFrameworkCoreModule)
)]
public class AuthIdentityServerModule : AbpModule
{
diff --git a/aspnet-core/services/account/AuthServer.Host/AuthServer.Host.csproj b/aspnet-core/services/account/AuthServer.Host/AuthServer.Host.csproj
index 4cdd8a9a2..fdb28789f 100644
--- a/aspnet-core/services/account/AuthServer.Host/AuthServer.Host.csproj
+++ b/aspnet-core/services/account/AuthServer.Host/AuthServer.Host.csproj
@@ -21,20 +21,19 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
diff --git a/aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/LINGYUN.ApiGateway.Host.csproj b/aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/LINGYUN.ApiGateway.Host.csproj
index e02f5665d..0fd1bf6fa 100644
--- a/aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/LINGYUN.ApiGateway.Host.csproj
+++ b/aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/LINGYUN.ApiGateway.Host.csproj
@@ -17,10 +17,10 @@
-
-
-
-
+
+
+
+
diff --git a/aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/LINGYUN/ApiGateway/ApiGatewayHostModule.cs b/aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/LINGYUN/ApiGateway/ApiGatewayHostModule.cs
index 6284a67b1..c7f286c49 100644
--- a/aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/LINGYUN/ApiGateway/ApiGatewayHostModule.cs
+++ b/aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/LINGYUN/ApiGateway/ApiGatewayHostModule.cs
@@ -13,6 +13,7 @@ using Volo.Abp.AspNetCore;
using Volo.Abp.Autofac;
using Volo.Abp.AutoMapper;
using Volo.Abp.Http.Client.IdentityModel;
+using Volo.Abp.IdentityModel;
using Volo.Abp.Modularity;
namespace LINGYUN.ApiGateway
@@ -70,6 +71,12 @@ namespace LINGYUN.ApiGateway
options.ApiSecret = configuration["AuthServer:ApiSecret"];
});
+ Configure(options =>
+ {
+ // See https://github.com/abpframework/abp/pull/4564
+ options.ConfigureHttpRequestMessage = (requestMessage) => { };
+ });
+
context.Services
.AddOcelot()
.AddPolly()
diff --git a/aspnet-core/services/apigateway/LINGYUN.ApiGateway.HttpApi.Host/LINGYUN.ApiGateway.HttpApi.Host.csproj b/aspnet-core/services/apigateway/LINGYUN.ApiGateway.HttpApi.Host/LINGYUN.ApiGateway.HttpApi.Host.csproj
index e9f0df4ff..2c4fb1915 100644
--- a/aspnet-core/services/apigateway/LINGYUN.ApiGateway.HttpApi.Host/LINGYUN.ApiGateway.HttpApi.Host.csproj
+++ b/aspnet-core/services/apigateway/LINGYUN.ApiGateway.HttpApi.Host/LINGYUN.ApiGateway.HttpApi.Host.csproj
@@ -28,11 +28,11 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/LINGYUN.Abp.MessageService.HttpApi.Host.csproj b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/LINGYUN.Abp.MessageService.HttpApi.Host.csproj
index 7c3fa1fa3..a70f01c71 100644
--- a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/LINGYUN.Abp.MessageService.HttpApi.Host.csproj
+++ b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/LINGYUN.Abp.MessageService.HttpApi.Host.csproj
@@ -33,13 +33,13 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/LINGYUN.Platform.HttpApi.Host.csproj b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/LINGYUN.Platform.HttpApi.Host.csproj
index 8e367fb01..10c29a216 100644
--- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/LINGYUN.Platform.HttpApi.Host.csproj
+++ b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/LINGYUN.Platform.HttpApi.Host.csproj
@@ -6,10 +6,10 @@
-
-
-
-
+
+
+
+
@@ -40,22 +40,22 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -64,14 +64,12 @@
-
-
diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/LINGYUN/Platform/AspNetCore/Mvc/ApplicationConfigurations/ApplicationConfigurationAppService.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/LINGYUN/Platform/AspNetCore/Mvc/ApplicationConfigurations/ApplicationConfigurationAppService.cs
deleted file mode 100644
index a838d0688..000000000
--- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/LINGYUN/Platform/AspNetCore/Mvc/ApplicationConfigurations/ApplicationConfigurationAppService.cs
+++ /dev/null
@@ -1,115 +0,0 @@
-using Microsoft.AspNetCore.Authorization;
-using Microsoft.Extensions.DependencyInjection;
-using Microsoft.Extensions.Options;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-using Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations;
-using Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending;
-using Volo.Abp.Authorization;
-using Volo.Abp.Authorization.Permissions;
-using Volo.Abp.Clients;
-using Volo.Abp.DependencyInjection;
-using Volo.Abp.Features;
-using Volo.Abp.Localization;
-using Volo.Abp.MultiTenancy;
-using Volo.Abp.PermissionManagement;
-using Volo.Abp.Settings;
-using Volo.Abp.Timing;
-using Volo.Abp.Users;
-
-namespace LINGYUN.Platform.AspNetCore.Mvc.ApplicationConfigurations
-{
- [Dependency(ServiceLifetime.Transient, ReplaceServices = true)]
- [ExposeServices(typeof(IAbpApplicationConfigurationAppService), typeof(AbpApplicationConfigurationAppService))]
- public class ApplicationConfigurationAppService : AbpApplicationConfigurationAppService
- {
- private readonly IPermissionGrantRepository _permissionGrantRepository;
- private readonly IPermissionDefinitionManager _permissionDefinitionManager;
-
- private ICurrentClient _currentClient;
-
- protected ICurrentClient CurrentClient => LazyGetRequiredService(ref _currentClient);
-
- public ApplicationConfigurationAppService(
- IOptions localizationOptions,
- IOptions multiTenancyOptions,
- IServiceProvider serviceProvider,
- IAbpAuthorizationPolicyProvider abpAuthorizationPolicyProvider,
- IAuthorizationService authorizationService,
- ICurrentUser currentUser,
- ISettingProvider settingProvider,
- ISettingDefinitionManager settingDefinitionManager,
- IFeatureDefinitionManager featureDefinitionManager,
- ILanguageProvider languageProvider,
- ITimezoneProvider timezoneProvider,
- IOptions abpClockOptions,
- ICachedObjectExtensionsDtoService cachedObjectExtensionsDtoService,
- IPermissionGrantRepository permissionGrantRepository,
- IPermissionDefinitionManager permissionDefinitionManager)
- : base(
- localizationOptions,
- multiTenancyOptions,
- serviceProvider,
- abpAuthorizationPolicyProvider,
- authorizationService,
- currentUser,
- settingProvider,
- settingDefinitionManager,
- featureDefinitionManager,
- languageProvider,
- timezoneProvider,
- abpClockOptions,
- cachedObjectExtensionsDtoService)
- {
- _permissionGrantRepository = permissionGrantRepository;
- _permissionDefinitionManager = permissionDefinitionManager;
-
- }
- protected override async Task GetAuthConfigAsync()
- {
- var authConfig = new ApplicationAuthConfigurationDto();
-
- var permissions = _permissionDefinitionManager.GetPermissions();
-
- IEnumerable grantPermissions = new List();
-
- // TODO: 重写为每次调用接口都在数据库统一查询权限
- // 待框架改进权限Provider机制后再移除
-
- // 如果用户已登录,获取用户和角色权限
- if (CurrentUser.IsAuthenticated)
- {
- var userPermissions = await _permissionGrantRepository.GetListAsync(UserPermissionValueProvider.ProviderName,
- CurrentUser.GetId().ToString());
- grantPermissions = grantPermissions.Union(userPermissions);
- foreach(var userRole in CurrentUser.Roles)
- {
- var rolePermissions = await _permissionGrantRepository.GetListAsync(RolePermissionValueProvider.ProviderName,
- userRole);
- grantPermissions = grantPermissions.Union(rolePermissions);
- }
- }
-
- // 如果客户端已验证,获取客户端权限
- if(CurrentClient.IsAuthenticated)
- {
- var clientPermissions = await _permissionGrantRepository.GetListAsync(ClientPermissionValueProvider.ProviderName,
- CurrentClient.Id);
- grantPermissions = grantPermissions.Union(clientPermissions);
- }
-
- foreach(var permission in permissions)
- {
- authConfig.Policies[permission.Name] = true;
- if(grantPermissions.Any(p => p.Name.Equals(permission.Name)))
- {
- authConfig.GrantedPolicies[permission.Name] = true;
- }
- }
-
- return authConfig;
- }
- }
-}
diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20200606012143_Upgrade-Abp-2.9.0.Designer.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20200606012143_Upgrade-Abp-2.9.0.Designer.cs
index b41063fac..b963751c4 100644
--- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20200606012143_Upgrade-Abp-2.9.0.Designer.cs
+++ b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Migrations/20200606012143_Upgrade-Abp-2.9.0.Designer.cs
@@ -10,7 +10,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace LINGYUN.Platform.Migrations
{
[DbContext(typeof(PlatformHttpApiHostMigrationsDbContext))]
- [Migration("20200606012143_Upgrade-Abp-2.9.0")]
+ [Migration("20200606012143_Upgrade-Abp-3.0.0")]
partial class UpgradeAbp290
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/PlatformHttpApiHostModule.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/PlatformHttpApiHostModule.cs
index 3b73a76d4..550e53015 100644
--- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/PlatformHttpApiHostModule.cs
+++ b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/PlatformHttpApiHostModule.cs
@@ -3,7 +3,6 @@ using IdentityModel;
using LINGYUN.Abp.EventBus.CAP;
using LINGYUN.Abp.ExceptionHandling;
using LINGYUN.Abp.ExceptionHandling.Emailing;
-using LINGYUN.Abp.Identity;
using LINGYUN.Abp.IdentityServer;
using LINGYUN.Abp.Location.Baidu;
using LINGYUN.Abp.MessageService;
@@ -27,7 +26,6 @@ using System.Text;
using Volo.Abp;
using Volo.Abp.Account;
using Volo.Abp.AspNetCore.Authentication.JwtBearer;
-using Volo.Abp.AspNetCore.MultiTenancy;
using Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy;
using Volo.Abp.Autofac;
using Volo.Abp.Caching;
@@ -40,6 +38,7 @@ using Volo.Abp.IdentityServer.EntityFrameworkCore;
using Volo.Abp.Localization;
using Volo.Abp.Modularity;
using Volo.Abp.MultiTenancy;
+using Volo.Abp.PermissionManagement;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.PermissionManagement.HttpApi;
using Volo.Abp.PermissionManagement.Identity;
@@ -49,8 +48,6 @@ using Volo.Abp.Security.Encryption;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
using Volo.Abp.TenantManagement.EntityFrameworkCore;
using Volo.Abp.VirtualFileSystem;
-using AbpPermissionManagementApplicationModule = LINGYUN.Abp.PermissionManagement.AbpPermissionManagementApplicationModule;
-
namespace LINGYUN.Platform
{
[DependsOn(
@@ -86,7 +83,6 @@ namespace LINGYUN.Platform
#if DEBUG
typeof(AbpBaiduLocationModule),
#endif
- typeof(AbpIdentityOverrideOptionsModule),
typeof(AbpAutofacModule)
)]
public class PlatformHttpApiHostModule : AbpModule
diff --git a/aspnet-core/tests/LINGYUN.Abp.BlobStoring.Aliyun.Tests/LINGYUN/Abp/BlobStoring/Aliyun/AliyunBlobNamingNormalizer_Tests.cs b/aspnet-core/tests/LINGYUN.Abp.BlobStoring.Aliyun.Tests/LINGYUN/Abp/BlobStoring/Aliyun/AliyunBlobNamingNormalizer_Tests.cs
new file mode 100644
index 000000000..26e74bd15
--- /dev/null
+++ b/aspnet-core/tests/LINGYUN.Abp.BlobStoring.Aliyun.Tests/LINGYUN/Abp/BlobStoring/Aliyun/AliyunBlobNamingNormalizer_Tests.cs
@@ -0,0 +1,57 @@
+using Shouldly;
+using Volo.Abp.BlobStoring;
+using Xunit;
+
+namespace LINGYUN.Abp.BlobStoring.Aliyun
+{
+ public class AliyunBlobNamingNormalizer_Tests : AbpBlobStoringAliyunTestBase
+ {
+ private readonly IBlobNamingNormalizer _blobNamingNormalizer;
+ public AliyunBlobNamingNormalizer_Tests()
+ {
+ _blobNamingNormalizer = GetRequiredService();
+ }
+
+ [Fact]
+ public void NormalizeContainerName_Lowercase()
+ {
+ var filename = "ThisIsMyContainerName";
+ filename = _blobNamingNormalizer.NormalizeContainerName(filename);
+ filename.ShouldBe("thisismycontainername");
+ }
+
+ [Fact]
+ public void NormalizeContainerName_Only_Letters_Numbers_Dash()
+ {
+ var filename = ",./this-i,./s-my-c,./ont,./ai+*/.=!@#$n^&*er-name.+/";
+ filename = _blobNamingNormalizer.NormalizeContainerName(filename);
+ filename.ShouldBe("this-is-my-container-name");
+ }
+
+ [Fact]
+ public void NormalizeContainerName_Dash()
+ {
+ var filename = "-this-is-my-container-name-";
+ filename = _blobNamingNormalizer.NormalizeContainerName(filename);
+ filename.ShouldBe("this-is-my-container-name");
+ }
+
+
+ [Fact]
+ public void NormalizeContainerName_Min_Length()
+ {
+ var filename = "a";
+ filename = _blobNamingNormalizer.NormalizeContainerName(filename);
+ filename.Length.ShouldBeGreaterThanOrEqualTo(3);
+ }
+
+
+ [Fact]
+ public void NormalizeContainerName_Max_Length()
+ {
+ var filename = "abpabpabpabpabpabpabpabpabpabpabpabpabpabpabpabpabpabpabpabpabpabpabp";
+ filename = _blobNamingNormalizer.NormalizeContainerName(filename);
+ filename.Length.ShouldBeLessThanOrEqualTo(63);
+ }
+ }
+}
diff --git a/aspnet-core/tests/LINGYUN.Abp.TestBase/LINGYUN.Abp.TestsBase.csproj b/aspnet-core/tests/LINGYUN.Abp.TestBase/LINGYUN.Abp.TestsBase.csproj
index d1b8b5acc..242477e67 100644
--- a/aspnet-core/tests/LINGYUN.Abp.TestBase/LINGYUN.Abp.TestsBase.csproj
+++ b/aspnet-core/tests/LINGYUN.Abp.TestBase/LINGYUN.Abp.TestsBase.csproj
@@ -13,9 +13,9 @@
-
-
-
+
+
+