Welcome to the IBM Collaboration Solutions Community IQJam
UsernamePassword
Reset Password | Register
   
Home | Tags | Help
run ssjs as another user? 
I have a button in an xPage that runs ssjs and create a document, is there a way to set the script in this button to run as another user. I guess by default the script is run as anonymous if the user is not logged in?
 
Thanks
Thomas
 
Domino Development / Domino Designer
Tagged
Thomas Adrian - over 4 years ago |  |  | Viewed 105 times

There are 2 answers

1votes
Easiest way is have an agent signed with the ID that you want it to run as, and the run the agent from your SSJS, it will run as the signed user (unless you specify the agent to run on behalf of the user)
Jeremy Hodge - over 4 years ago | 
Voting
Vote on the answer to show whether you think the answer is correct or useful to the rest of the community.

Answers with more votes are more visible to the rest of the community
0votes
OK, that could work, or I guess I could set a paramater to ?openagent&unid= and handle the parameters in the agent.
 
the problem as I see this is that the agent will not get a handle to the current xpage, which means if I want the agent to fetch info from the xpage I need to pass this information using parameters.
 
thanks
Thomas
 

 
 
 
 
Thomas Adrian - over 4 years ago | 
Voting
Vote on the answer to show whether you think the answer is correct or useful to the rest of the community.

Answers with more votes are more visible to the rest of the community

Experts for Domino Development / Domino Designer