abpframework / abp

Open-source web application framework for ASP.NET Core! Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET. Provides the fundamental infrastructure, cross-cutting-concern implementations, startup templates, application modules, UI themes, tooling and documentation.
https://abp.io
GNU Lesser General Public License v3.0
12.73k stars 3.41k forks source link

Dtos field Permission? #19426

Open mansai opened 5 months ago

mansai commented 5 months ago

Is there an existing issue for this?

Is your feature request related to a problem? Please describe the problem.

OrderDetailDto,User1 allowed to view prices,User2 is not allowed to view prices Price field(Price,TaxPrice,MaxPurPrice,MinPurPrice,NewPurPrice,AvgPurPrice,SysPurPrice)

[Serializable]
public class PUR_OrderDetailDto : CreationAuditedEntityDto<int>
{       

    public string PUR_OrderId { get; set; }
    public string SourceNo { get; set; }

    public string SourceTypeId { get; set; }

    public int? SourceId { get; set; }

    public string SalesId { get; set; }

    public string ProjectId { get; set; }

    public string BomId { get; set; }

    public int MaterialId { get; set; }
    public string MaterialNumber { get; set; }
    public string MaterialName { get; set; }
    public string MaterialSpecification { get; set; }
    public string MaterialUnitId { get; set; }

    public string UnitId { get; set; }

    public decimal? StockQty { get; set; }

    public decimal Qty { get; set; }

    public decimal? CancelQty { get; set; }

    public decimal? NeedQty { get; set; }

    public decimal ReceiveQty { get; set; }

    public decimal? StockInQty { get; set; }

    public decimal? ReturnQty { get; set; }

    public DateTime? DeliveryDate { get; set; }

    public decimal? Price { get; set; }

    public decimal? TaxPrice { get; set; }

    public decimal? Tax { get; set; }

    public decimal? TaxAmount { get; set; }

    public decimal? Amount { get; set; }

    public decimal? AllAmount { get; set; }

    public decimal? MaxPurPrice { get; set; }

    public decimal? MinPurPrice { get; set; }

    public decimal? NewPurPrice { get; set; }

    public decimal? AvgPurPrice { get; set; }

    public decimal? SysPurPrice { get; set; }

    public string Remark { get; set; }

    public byte Status { get; set; }

    public byte CloseStatus { get; set; }

    public Guid? CloserId { get; set; }

    public DateTime? CloseDate { get; set; }

    public byte CancelStatus { get; set; }

    public Guid? CancellerId { get; set; }

    public DateTime? CancelDate { get; set; }
}

Describe the solution you'd like

[Permission] public decimal? Price { get; set; }

Please provide an example of showing or hiding fields

Additional context

No response

realLiangshiwei commented 5 months ago

There is no DTO field permission. You can add a Price permission and check it in the application service.