Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table plus
applyColStyleToCelltrue
heading0
columnTypess,s,s,s
multiplefalse
columnAttributesstyle="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold,
enableSortingfalse

Syntax

runAs(user)

Package

Alias

Pkg Usage

Description

Excerpt
hiddentrue
Assumes a user when running a script.

Assumes a user when running a script.

Parameters

Table plus
applyColStyleToCelltrue
columnTypess,s,s,s
heading0
multiplefalse
enableSortingfalse

Parameter name

Type

Required

Description

User

String

Yes

Username of userkey of the selected user.

Return Type

None

Example

Code Block
languagejs
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

Note

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

See also

Filter by label (Content by label)
showLabelsfalse
max25
showSpacefalse
cqllabel = "user_routine" and space = currentSpace ( )
labelsarray_routines