From 843464efc844d7f129e44127bca33e09e76e4503 Mon Sep 17 00:00:00 2001 From: Laszlo Hornyak Date: Sun, 23 Mar 2014 09:47:21 +0100 Subject: [PATCH] removed commented-out code Signed-off-by: Laszlo Hornyak --- server/src/com/cloud/api/ApiServlet.java | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/server/src/com/cloud/api/ApiServlet.java b/server/src/com/cloud/api/ApiServlet.java index 2ecab36d3f0..f10f67a3a98 100755 --- a/server/src/com/cloud/api/ApiServlet.java +++ b/server/src/com/cloud/api/ApiServlet.java @@ -309,19 +309,6 @@ public class ApiServlet extends HttpServlet { } if (_apiServer.verifyRequest(params, userId)) { - /* - * if (accountObj != null) { Account userAccount = (Account)accountObj; if (userAccount.getType() == - * Account.ACCOUNT_TYPE_NORMAL) { params.put(BaseCmd.Properties.USER_ID.getName(), new String[] { userId }); - * params.put(BaseCmd.Properties.ACCOUNT.getName(), new String[] { account }); - * params.put(BaseCmd.Properties.DOMAIN_ID.getName(), new String[] { domainId }); - * params.put(BaseCmd.Properties.ACCOUNT_OBJ.getName(), new Object[] { accountObj }); } else { - * params.put(BaseCmd.Properties.USER_ID.getName(), new String[] { userId }); - * params.put(BaseCmd.Properties.ACCOUNT_OBJ.getName(), new Object[] { accountObj }); } } - * - * // update user context info here so that we can take information if the request is authenticated // via api - * key mechanism updateUserContext(params, session != null ? session.getId() : null); - */ - auditTrailSb.insert(0, "(userId=" + CallContext.current().getCallingUserId() + " accountId=" + CallContext.current().getCallingAccount().getId() + " sessionId=" + (session != null ? session.getId() : null) + ")"); @@ -362,16 +349,6 @@ public class ApiServlet extends HttpServlet { } } - /* - * private void updateUserContext(Map requestParameters, String sessionId) { String userIdStr = - * (String)(requestParameters.get(BaseCmd.Properties.USER_ID.getName())[0]); Account accountObj = - * (Account)(requestParameters.get(BaseCmd.Properties.ACCOUNT_OBJ.getName())[0]); - * - * Long userId = null; Long accountId = null; if(userIdStr != null) userId = Long.parseLong(userIdStr); - * - * if(accountObj != null) accountId = accountObj.getId(); UserContext.updateContext(userId, accountId, sessionId); } - */ - // FIXME: rather than isError, we might was to pass in the status code to give more flexibility private void writeResponse(final HttpServletResponse resp, final String response, final int responseCode, final String responseType) { try {