Missing Check*PolicyAsync usage in documentation?
In official tutorial the *PolicyName family is set in BookAppService ctor but I don't see any Check*PolicyAsync call in method overrides. Is this forgotten or is there an automagic somewhere calling them?
hi
It will automatically check the policy in AbstractKeyCrudAppService class.
https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AbstractKeyCrudAppService.cs#L87
@maliming I agree for CreateAsync. But tutorial overrides methods GetAsync and GetListAsync without calling any Check*PolicyAsync or base method.
https://github.com/abpframework/abp/blob/27050189dc6653c851fa99ce191013c600a2bfad/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AbstractKeyReadOnlyAppService.cs#L63 https://github.com/abpframework/abp/blob/27050189dc6653c851fa99ce191013c600a2bfad/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AbstractKeyReadOnlyAppService.cs#L54
@maliming Base classes are good. Tutorial overrides not seems so. Look at their bodies (https://docs.abp.io/en/abp/latest/Tutorials/Part-10?UI=MVC&DB=EF#bookappservice).
You are right! Will be update the document.