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

public class ImpersonateUserCommand extends PostCommand<CommandResponse>
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.

  • Constructor Details

    • ImpersonateUserCommand

      public ImpersonateUserCommand(int userId)
    • ImpersonateUserCommand

      public ImpersonateUserCommand(String email)
  • Method Details

    • createParameterMap

      protected Map<String,Object> 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 class Command<CommandResponse,org.apache.hc.client5.http.classic.methods.HttpPost>
      Returns:
      The parameter map to use when building the URL.