Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Execute method with no permissions #8961


User avatar
0
ignasiclos created

Hello,

I have the need to get all the users that has a given permission (userappservice , need Pages_Administration_Users permission), from a method that doesn't need this permission ).

Is there anyway to override the permissions of a given method?

Thanks


4 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    hi

    Do you want to call the application service in the background job?

    Please share your use case in detail.

  • User Avatar
    0
    ignasiclos created

    I have the appservice 1 that need permission A, that needs to call the appservice 2 that needs permission B. User calling appservice 1 has permission A, but not B :

    appservice1.doit(){

    var ret = appservice2.dothat(); <- Need permission B
    

    }

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @ignasiclos

    It is a bad practice to call one app service from another. Instead, you can create a domain service, move your common code to this domain servicen and use it from appservice1 and appservice2.

  • User Avatar
    0
    ignasiclos created

    That makes sense. Thank you