Browse Source
Merge pull request #589 from colinin/fix-tenant-able-change-global-setting
fix: fixed tenant being able to change global setting
pull/645/head
yx lin
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
11 additions and
3 deletions
-
aspnet-core/modules/cloud-tencent/LINGYUN.Abp.Tencent/LINGYUN/Abp/Tencent/Settings/TencentCloudSettingNames.cs
-
aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN/Abp/SettingManagement/Localization/ApplicationContracts/en.json
-
aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN/Abp/SettingManagement/Localization/ApplicationContracts/zh-Hans.json
-
aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application/LINGYUN/Abp/SettingManagement/SettingAppService.cs
|
|
|
@ -52,7 +52,7 @@ public static class TencentCloudSettingNames |
|
|
|
/// 短信 SdkAppId
|
|
|
|
/// 在 短信控制台 添加应用后生成的实际 SdkAppId,示例如1400006666。
|
|
|
|
/// </summary>
|
|
|
|
public const string AppId = Prefix + ".Domain"; |
|
|
|
public const string AppId = Prefix + ".AppId"; |
|
|
|
/// <summary>
|
|
|
|
/// 短信签名内容
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
@ -40,6 +40,7 @@ |
|
|
|
"DisplayName:FileManagement": "File Management", |
|
|
|
"Description:FileManagement": "File Management", |
|
|
|
"DisplayName:FileManagement.FileSystem": "File System", |
|
|
|
"Description:FileManagement.FileSystem": "File System" |
|
|
|
"Description:FileManagement.FileSystem": "File System", |
|
|
|
"TenantCannotChangeGlobalSetting": "Tenant cannot change the global settings" |
|
|
|
} |
|
|
|
} |
|
|
|
@ -40,6 +40,7 @@ |
|
|
|
"DisplayName:FileManagement": "文件管理", |
|
|
|
"Description:FileManagement": "文件管理", |
|
|
|
"DisplayName:FileManagement.FileSystem": "文件系统", |
|
|
|
"Description:FileManagement.FileSystem": "文件系统" |
|
|
|
"Description:FileManagement.FileSystem": "文件系统", |
|
|
|
"TenantCannotChangeGlobalSetting": "租户不能变更公共配置" |
|
|
|
} |
|
|
|
} |
|
|
|
@ -2,6 +2,7 @@ |
|
|
|
using Microsoft.Extensions.Options; |
|
|
|
using System.Linq; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using Volo.Abp; |
|
|
|
using Volo.Abp.Account.Settings; |
|
|
|
using Volo.Abp.Application.Services; |
|
|
|
using Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations; |
|
|
|
@ -48,6 +49,11 @@ namespace LINGYUN.Abp.SettingManagement |
|
|
|
[Authorize(AbpSettingManagementPermissions.Settings.Manager)] |
|
|
|
public virtual async Task SetGlobalAsync(UpdateSettingsDto input) |
|
|
|
{ |
|
|
|
if (CurrentTenant.IsAvailable) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException(L["TenantCannotChangeGlobalSetting"]); |
|
|
|
} |
|
|
|
|
|
|
|
// 增加特性检查
|
|
|
|
await CheckFeatureAsync(); |
|
|
|
|
|
|
|
|