labkey.security.impersonateUser {Rlabkey} | R Documentation |
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)
Arguments
baseUrl |
A string specifying the |
folderPath |
A string specifying the |
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. |
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
.
Value
Returns a success message based on a call to labkey.whoAmI
.
Author(s)
Cory Nathe
See Also
labkey.whoAmI
,
labkey.security.stopImpersonating
Examples
## Not run:
library(Rlabkey)
labkey.security.impersonateUser(baseUrl="http://labkey/", folderPath = "/home",
email = "reader@localhost.test"
)
## End(Not run)