View source: R/labkey.security.R
labkey.security.impersonateUser | R Documentation |
For site-admins or project-admins only, start impersonating a user based on the userId or email address.
labkey.security.impersonateUser(baseUrl=NULL, folderPath,
userId=NULL, email=NULL)
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. |
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
.
Returns a success message based on a call to labkey.whoAmI
.
Cory Nathe
labkey.whoAmI
,
labkey.security.stopImpersonating
## Not run:
library(Rlabkey)
labkey.security.impersonateUser(baseUrl="http://labkey/", folderPath = "/home",
email = "reader@localhost.test"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.