Package org.labkey.remoteapi.security
Class ImpersonateUserCommand
java.lang.Object
org.labkey.remoteapi.Command<ResponseType,org.apache.hc.client5.http.classic.methods.HttpPost>
org.labkey.remoteapi.PostCommand<CommandResponse>
org.labkey.remoteapi.security.ImpersonateUserCommand
- All Implemented Interfaces:
HasRequiredVersion
For site-admins or project-admins only, start impersonating a user.
Admins may impersonate other users to perform actions on their behalf. Site users 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 any user that has access to the project.
To finish an impersonation session use either LogoutCommand
to
log the original user out or use StopImpersonatingCommand
to stop
impersonating while keeping the original user logged in.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.labkey.remoteapi.Command
Command.CommonParameters, Command.Response
-
Field Summary
Fields inherited from class org.labkey.remoteapi.Command
CONTENT_TYPE_JSON
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a new, mutable parameter map.Methods inherited from class org.labkey.remoteapi.PostCommand
createRequest, getJsonObject
Methods inherited from class org.labkey.remoteapi.Command
_execute, createResponse, execute, getActionName, getControllerName, getHttpRequest, getParameters, getParamValueAsString, getRequiredVersion, getTimeout, setRequiredVersion, setTimeout
-
Constructor Details
-
ImpersonateUserCommand
public ImpersonateUserCommand(int userId) -
ImpersonateUserCommand
-
-
Method Details
-
createParameterMap
Description copied from class:Command
Returns a new, mutable parameter map. Derived classes will typically override this method to put values passed to specialized setter methods into the map.- Overrides:
createParameterMap
in classCommand<CommandResponse,
org.apache.hc.client5.http.classic.methods.HttpPost> - Returns:
- The parameter map to use when building the URL.
-