Browse Source

fix(saas): 修改连接字符串时应检查有效性

pull/995/head
colin 1 year ago
parent
commit
5df97aac15
  1. 2
      aspnet-core/modules/saas/LINGYUN.Abp.Saas.Application/LINGYUN/Abp/Saas/Tenants/TenantAppService.cs

2
aspnet-core/modules/saas/LINGYUN.Abp.Saas.Application/LINGYUN/Abp/Saas/Tenants/TenantAppService.cs

@ -213,6 +213,8 @@ public class TenantAppService : AbpSaasAppServiceBase, ITenantAppService
[Authorize(AbpSaasPermissions.Tenants.ManageConnectionStrings)] [Authorize(AbpSaasPermissions.Tenants.ManageConnectionStrings)]
public async virtual Task<TenantConnectionStringDto> SetConnectionStringAsync(Guid id, TenantConnectionStringCreateOrUpdate input) public async virtual Task<TenantConnectionStringDto> SetConnectionStringAsync(Guid id, TenantConnectionStringCreateOrUpdate input)
{ {
await CheckConnectionString(input.Value, input.Name);
var tenant = await TenantRepository.GetAsync(id); var tenant = await TenantRepository.GetAsync(id);
var oldConnectionString = tenant.FindConnectionString(input.Name); var oldConnectionString = tenant.FindConnectionString(input.Name);

Loading…
Cancel
Save