0

Does anyone know how to have a restlet run as a different role? (e.g. similar to how Suitelets can be configured to run as the Administrator role)

Any tricks to make this possible?

angrycrab
  • 830
  • 1
  • 9
  • 23

1 Answers1

4

There is no configuration of role on the Restlet script itself. The role is defined when you send a request to the Restlet.

The header of the request contains the role that the restlet will execute as.

If you are using NLAuth to authenticate then one of the parameters is the role id. So if you want to execute it as admin, send "3" as the role id.

If you are using token authentication, then when you are creating the token, one of the steps is to choose the role. In this case, you can not execute as admin, you will have to define a role that will correspond to your needs.

Igor Po
  • 160
  • 1
  • 8