Skip to content

数据审计时应可以忽略某些不需要审计或者敏感的实体属性 #143

@gmf520

Description

@gmf520

您的功能请求与现有问题有关吗?请描述

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

现在的数据审计是实体全属性审计,一些敏感属性应该能够被忽略掉

描述您想要的解决方案

A clear and concise description of what you want to happen.

添加一个AuditIgnoreAttribute用于标记需要忽略的属性

[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false)]
public sealed class AuditIgnoreAttribute : Attribute
{ }

在需要忽略的实体属性上标注:

/// <summary>
/// 获取或设置 标准化的电子邮箱
/// </summary>
[DisplayName("标准化的电子邮箱"), DataType(DataType.EmailAddress), AuditIgnore]
public string NormalizeEmail { get; set; }

/// <summary>
/// 获取或设置 密码哈希值
/// </summary>
[DisplayName("密码哈希值"), AuditIgnore]
public string PasswordHash { get; set; }

相关Issue:#64

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions