Go to the first, previous, next, last section, table of contents.


rootAsUserDo

Control-struct: user rootAsUserDo{ ... }
file: job.t
package: muf
status: alpha

An error will be signaled if @$s.actingUser is not of Class Root. (In the usual Muq configuration, the only instance of Class Root is .u["root"].)

This construct allows you to write a function which executes with the privileges of an arbitrary other user. This is the preferred way for a system administrator to fiddle with the property of a particular user.

This construct saves the current value of @$s.actingUser on the loop stack, then sets @$s.actingUser to the value supplied at top of stack. Upon exit from the construct, the original value of @$s.actingUser is restored.

See section rootPushUserFrame. See section rootOmnipotentlyDo. See section pushLockframe. See section asMeDo.


Go to the first, previous, next, last section, table of contents.