You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ah...@apache.org on 2013/06/27 02:40:00 UTC

git commit: updated refs/heads/vmsync to cbca4bb

Updated Branches:
  refs/heads/vmsync 42b483295 -> cbca4bb6f


Added missing context


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/cbca4bb6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/cbca4bb6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/cbca4bb6

Branch: refs/heads/vmsync
Commit: cbca4bb6f90ca8845c0301eb815cafae1b8fc5cb
Parents: 42b4832
Author: Alex Huang <al...@gmail.com>
Authored: Wed Jun 26 17:40:49 2013 -0700
Committer: Alex Huang <al...@gmail.com>
Committed: Wed Jun 26 17:40:49 2013 -0700

----------------------------------------------------------------------
 server/src/com/cloud/api/ApiServlet.java | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cbca4bb6/server/src/com/cloud/api/ApiServlet.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiServlet.java b/server/src/com/cloud/api/ApiServlet.java
index 7afb797..b929082 100755
--- a/server/src/com/cloud/api/ApiServlet.java
+++ b/server/src/com/cloud/api/ApiServlet.java
@@ -43,6 +43,7 @@ import org.apache.cloudstack.context.CallContext;
 import com.cloud.exception.CloudAuthenticationException;
 import com.cloud.user.Account;
 import com.cloud.user.AccountService;
+import com.cloud.user.User;
 import com.cloud.utils.StringUtils;
 
 @Component("apiServlet")
@@ -280,6 +281,8 @@ public class ApiServlet extends HttpServlet {
                     writeResponse(resp, serializedResponse, HttpServletResponse.SC_UNAUTHORIZED, responseType);
                     return;
                 }
+            } else {
+                CallContext.register(User.UID_SYSTEM, Account.ACCOUNT_ID_SYSTEM, null);
             }
 
             if (_apiServer.verifyRequest(params, userId)) {