You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2013/01/09 05:37:24 UTC
[31/50] [abbrv] git commit: ApiServer: Fix debug output for role
based user access checking
ApiServer: Fix debug output for role based user access checking
Signed-off-by: Rohit Yadav <bh...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/19cf6650
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/19cf6650
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/19cf6650
Branch: refs/heads/master
Commit: 19cf665094f7915d8058cdb7c1cde8da870e9ab2
Parents: a9ab42d
Author: Rohit Yadav <bh...@apache.org>
Authored: Sun Jan 6 16:51:14 2013 -0800
Committer: Rohit Yadav <bh...@apache.org>
Committed: Sun Jan 6 16:51:14 2013 -0800
----------------------------------------------------------------------
server/src/com/cloud/api/ApiServer.java | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/19cf6650/server/src/com/cloud/api/ApiServer.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiServer.java b/server/src/com/cloud/api/ApiServer.java
index c9d4567..ca25d61 100755
--- a/server/src/com/cloud/api/ApiServer.java
+++ b/server/src/com/cloud/api/ApiServer.java
@@ -561,15 +561,15 @@ public class ApiServer implements HttpRequestHandler {
if (userId != null) {
User user = ApiDBUtils.findUserById(userId);
if (!isCommandAvailable(user, commandName)) {
- s_logger.warn("The given command:" + commandName + " does not exist");
- throw new ServerApiException(BaseCmd.UNSUPPORTED_ACTION_ERROR, "The given command does not exist");
+ s_logger.warn("The given command:" + commandName + " does not exist or it is not available for user");
+ throw new ServerApiException(BaseCmd.UNSUPPORTED_ACTION_ERROR, "The given command does not exist or it is not available for user");
}
return true;
} else {
// check against every available command to see if the command exists or not
if (!isCommandAvailable(null, commandName) && !commandName.equals("login") && !commandName.equals("logout")) {
- s_logger.warn("The given command:" + commandName + " does not exist");
- throw new ServerApiException(BaseCmd.UNSUPPORTED_ACTION_ERROR, "The given command does not exist");
+ s_logger.warn("The given command:" + commandName + " does not exist or it is not available for user");
+ throw new ServerApiException(BaseCmd.UNSUPPORTED_ACTION_ERROR, "The given command does not exist or it is not available for user");
}
}
@@ -662,8 +662,8 @@ public class ApiServer implements HttpRequestHandler {
UserContext.updateContext(user.getId(), account, null);
if (!isCommandAvailable(user, commandName)) {
- s_logger.warn("The given command:" + commandName + " does not exist");
- throw new ServerApiException(BaseCmd.UNSUPPORTED_ACTION_ERROR, "The given command:" + commandName + " does not exist");
+ s_logger.warn("The given command:" + commandName + " does not exist or it is not available for user");
+ throw new ServerApiException(BaseCmd.UNSUPPORTED_ACTION_ERROR, "The given command:" + commandName + " does not exist or it is not available for user");
}
// verify secret key exists