Learn R Programming

Rlabkey (version 3.3.0)

labkey.security.impersonateUser: Start impersonating a user

Description

For site-admins or project-admins only, start impersonating a user based on the userId or email address.

Usage

labkey.security.impersonateUser(baseUrl=NULL, folderPath,
    userId=NULL, email=NULL)

Value

Returns a success message based on a call to labkey.whoAmI.

Arguments

baseUrl

A string specifying the baseUrl for the LabKey server.

folderPath

A string specifying the folderPath in which to impersonate the user.

userId

The id of the user to be impersonated. Either this or email is required.

email

The email of the user to be impersonated. Either this or userID is required.

Author

Cory Nathe

Details

Admins may impersonate other users to perform actions on their behalf. Site admins may impersonate any user in any project. Project admins must execute this command in a project in which they have admin permission and may impersonate only users that have access to the project.

To finish an impersonation session use labkey.security.stopImpersonating.

See Also

labkey.whoAmI, labkey.security.stopImpersonating

Examples

Run this code
if (FALSE) {

library(Rlabkey)

labkey.security.impersonateUser(baseUrl="http://labkey/", folderPath = "/home",
    email = "reader@localhost.test"
)

}

Run the code above in your browser using DataLab