xo::ConnectionContext instproc eval_as_user (public)

 <instance of xo::ConnectionContext[i]> eval_as_user \
    [ -user_id user_id ] cmd

Defined in packages/xotcl-core/tcl/context-procs.tcl

Run a command as the specified different user. Essentially, this method updates xo::cc and the ad_conn array array with the specified user, runs the command and resets the user to the previous value.

Switches:
-user_id
(optional)
switch temporarily to this user
Parameters:
cmd - command to be exevuted

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xo::ConnectionContext instproc eval_as_user xo::ConnectionContext instproc eval_as_user test_create_test_items->xo::ConnectionContext instproc eval_as_user

Testcases:
create_test_items
[ show source ]
Show another procedure: