Base solution for your next web application
Open Closed

ABPAUTHORIZE AUTOMATIC FOR SERVICES #3731


User avatar
0
hasan created

Hello Team

Is there any way to set all the ApplicationServices as AbpAuthorizr without mention in each method ?

Thanks in advance


3 Answer(s)
  • User Avatar
    0
    alirizaadiyahsi created

    Hi,

    If I understand, you can add AbpAuthorize attribute to AppService class, then all methods affected. For example:

    [AbpAuthorize()]
    public class SomeAppService: AbpZeroTemplateAppServiceBase, ISomeAppService
    {
        ...
    
  • User Avatar
    0
    hasan created

    How to set for all the Services at one place ?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @Hasan,

    Adding [AbpAuthorize] to [*AppServiceBase] class might work but I'm not sure about this. If it does not work, you need to add this attribute to every service you want to authorize.

    Thanks.