diff --git a/aspnet-core/modules/data-protection/LINGYUN.Abp.DataProtectionManagement.Application/LINGYUN/Abp/DataProtectionManagement/OrganizationUnitEntityRuleAppService.cs b/aspnet-core/modules/data-protection/LINGYUN.Abp.DataProtectionManagement.Application/LINGYUN/Abp/DataProtectionManagement/OrganizationUnitEntityRuleAppService.cs index 88f2a6437..ef4d5cab8 100644 --- a/aspnet-core/modules/data-protection/LINGYUN.Abp.DataProtectionManagement.Application/LINGYUN/Abp/DataProtectionManagement/OrganizationUnitEntityRuleAppService.cs +++ b/aspnet-core/modules/data-protection/LINGYUN.Abp.DataProtectionManagement.Application/LINGYUN/Abp/DataProtectionManagement/OrganizationUnitEntityRuleAppService.cs @@ -36,8 +36,8 @@ public class OrganizationUnitEntityRuleAppService : DataProtectionManagementAppl { throw new BusinessException(DataProtectionManagementErrorCodes.OrganizationUnitEntityRule.DuplicateEntityRule) .WithData(nameof(OrganizationUnitEntityRule.OrgCode), input.OrgCode) - .WithData(nameof(EntityTypeInfo.DisplayName), entityTypeInfo.DisplayName) - .WithData(nameof(EntityRuleBase.Operation), input.Operation); + .WithData(nameof(EntityTypeInfo.Name), entityTypeInfo.Name) + .WithData(nameof(EntityRuleBase.Operation), input.Operation.ToString()); } var entityRule = new OrganizationUnitEntityRule( @@ -78,6 +78,7 @@ public class OrganizationUnitEntityRuleAppService : DataProtectionManagementAppl { entityRule.AllowProperties = allowPropertites; } + entityRule.FilterGroup = input.FilterGroup; entityRule = await _organizationUnitEntityRuleRepository.UpdateAsync(entityRule); diff --git a/aspnet-core/modules/data-protection/LINGYUN.Abp.DataProtectionManagement.Application/LINGYUN/Abp/DataProtectionManagement/RoleEntityRuleAppService.cs b/aspnet-core/modules/data-protection/LINGYUN.Abp.DataProtectionManagement.Application/LINGYUN/Abp/DataProtectionManagement/RoleEntityRuleAppService.cs index 21a7fedc3..f77ce9ef4 100644 --- a/aspnet-core/modules/data-protection/LINGYUN.Abp.DataProtectionManagement.Application/LINGYUN/Abp/DataProtectionManagement/RoleEntityRuleAppService.cs +++ b/aspnet-core/modules/data-protection/LINGYUN.Abp.DataProtectionManagement.Application/LINGYUN/Abp/DataProtectionManagement/RoleEntityRuleAppService.cs @@ -34,10 +34,10 @@ public class RoleEntityRuleAppService : DataProtectionManagementApplicationServi var entityTypeInfo = await _entityTypeInfoRepository.GetAsync(input.EntityTypeId); if (await _roleEntityRuleRepository.FindEntityRuleAsync(input.RoleName, entityTypeInfo.TypeFullName, input.Operation) != null) { - throw new BusinessException(DataProtectionManagementErrorCodes.OrganizationUnitEntityRule.DuplicateEntityRule) + throw new BusinessException(DataProtectionManagementErrorCodes.RoleEntityRule.DuplicateEntityRule) .WithData(nameof(RoleEntityRule.RoleName), input.RoleName) - .WithData(nameof(EntityTypeInfo.DisplayName), entityTypeInfo.DisplayName) - .WithData(nameof(EntityRuleBase.Operation), input.Operation); + .WithData(nameof(EntityTypeInfo.Name), entityTypeInfo.Name) + .WithData(nameof(EntityRuleBase.Operation), input.Operation.ToString()); } var entityRule = new RoleEntityRule( @@ -79,6 +79,8 @@ public class RoleEntityRuleAppService : DataProtectionManagementApplicationServi entityRule.AllowProperties = allowPropertites; } + entityRule.FilterGroup = input.FilterGroup; + entityRule = await _roleEntityRuleRepository.UpdateAsync(entityRule); await CurrentUnitOfWork.SaveChangesAsync(); diff --git a/aspnet-core/modules/data-protection/LINGYUN.Abp.DataProtectionManagement.Domain/LINGYUN/Abp/DataProtectionManagement/ProtectedEntitiesSaver.cs b/aspnet-core/modules/data-protection/LINGYUN.Abp.DataProtectionManagement.Domain/LINGYUN/Abp/DataProtectionManagement/ProtectedEntitiesSaver.cs index b905f4b16..a95b4825c 100644 --- a/aspnet-core/modules/data-protection/LINGYUN.Abp.DataProtectionManagement.Domain/LINGYUN/Abp/DataProtectionManagement/ProtectedEntitiesSaver.cs +++ b/aspnet-core/modules/data-protection/LINGYUN.Abp.DataProtectionManagement.Domain/LINGYUN/Abp/DataProtectionManagement/ProtectedEntitiesSaver.cs @@ -67,7 +67,7 @@ public class ProtectedEntitiesSaver : IProtectedEntitiesSaver, ITransientDepende var newRecords = new List(); var changeRecords = new List(); - var entityTypeList = await EntityTypeInfoRepository.GetListAsync(); + var entityTypeList = await EntityTypeInfoRepository.GetListAsync(includeDetails: true); foreach (var protectedEntityMap in ManagementOptions.ProtectedEntities) { var resourceType = protectedEntityMap.Key;