Base solution for your next web application
Open Closed

Authorize vs. AbpAuthorize for DynamicPropertyService and other services. #10027


User avatar
0
codescientists created

Prerequisites:

  • What is your product version? 10.0
  • What is your product type (Angular or MVC)? Angular
  • What is product framework type (.net framework or .net core)? .net core

I have noticed that a few of the ApplicationServices in OurProject.Application make use of the Aspnetcore AuthorizeAttributeat class or method-leve, instead of AbpAuthorizeAttribute, namely these: DynamicPropertyAppService, DynamicPropertyValueAppService, DynamicEntityPropertyAppService, DynamicEntityPropertyValueAppService PaymentAppService

But it does not seem that this attribute can do anything at the service layer, since these are not aspnetcore controllers. In practice it appears that unauthorized calls can be made. Should I replace with AbpAuthorize? Other services seem to use this, and when used, unauthorized calls are rejected.


1 Answer(s)