class UserService extends BasicService {

	@POST
	@Path("/users/{userId}/impersonate")
	public Response impersonateUser(@PathParam("userId") long userId) {
		if (!isAdmin()) {
			throwUnauthorized();
		}
		User existingUser = getExistingUser(userId);

		userUtil.impersonateUser(request, existingUser.getUserId());

		return RESPONSE_OK;
	}

}