Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
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.