Skip to end of banner
Go to start of banner

runAs

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Description

Assumes a user when running a script.

Parameters

Return Type

None

Example

runAs("user1");
 print(currentDate());
 print(currentUser());
 runAs("admin");

The output in the console will be following:
2012 -06 -20 13: 39: 31, 629 pool -5 -thread -2 INFO user1 819x261x1 1k7wpbj 127.0.0.1 /rest/keplerrominfo/jjupin/latest/rungadget/run[commons.sil.routines.StringPrintRoutine] 2012-06-20 13:39:31
2012-06-20 13:39:31, 629 pool-5-thread 2 INFO user1 819x261x1 1k7wpbj 127.0.0.1 /rest/keplerrominfo/jjupin/latest/rungadget/run[commons.sil.routines.StringPrintRoutine] user1

The look-up is first made after the userkey, then after the username.

See also

  • No labels