refactor: 禁止 TenantId=0 并改为系统租户
This commit is contained in:
@@ -327,7 +327,7 @@ public sealed class DictionaryAppService(
|
||||
var tenantId = tenantProvider.GetCurrentTenantId();
|
||||
if (scope == DictionaryScope.System)
|
||||
{
|
||||
EnsurePlatformTenant(tenantId);
|
||||
EnsureSystemTenant(tenantId);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -362,9 +362,9 @@ public sealed class DictionaryAppService(
|
||||
}
|
||||
}
|
||||
|
||||
private void EnsurePlatformTenant(long tenantId)
|
||||
private void EnsureSystemTenant(long tenantId)
|
||||
{
|
||||
// 1. (空行后) 系统字典只能在平台租户(TenantId=0)上下文中操作
|
||||
// 1. (空行后) 系统字典只能在系统租户(TenantId=0)上下文中操作
|
||||
if (tenantId != 0)
|
||||
{
|
||||
throw new BusinessException(ErrorCodes.Forbidden, "租户端不允许操作系统字典");
|
||||
|
||||
Reference in New Issue
Block a user