You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by al...@apache.org on 2013/04/11 01:09:36 UTC
[13/50] git commit: updated refs/heads/internallb to ed0cb2f
CLOUDSTACK-1675: VMSnapshot: ListVMSnapshotsCmd should not display Domain ID in the Error Message
Description:
Replace domain db id by uuid in exception message.
Signed-off-by: Mice Xia <mi...@tcloudcomputing.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7e1eda0d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7e1eda0d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7e1eda0d
Branch: refs/heads/internallb
Commit: 7e1eda0de2fdb3a3c8e2cbcf7f5c9dc5a3400b7b
Parents: 595f070
Author: Vijayendra Bhamidipati <vi...@citrix.com>
Authored: Wed Mar 27 09:33:00 2013 -0700
Committer: Alena Prokharchyk <al...@citrix.com>
Committed: Wed Apr 10 15:43:36 2013 -0700
----------------------------------------------------------------------
server/src/com/cloud/user/AccountManagerImpl.java | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7e1eda0d/server/src/com/cloud/user/AccountManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/user/AccountManagerImpl.java b/server/src/com/cloud/user/AccountManagerImpl.java
index 9736aa1..bc93df8 100755
--- a/server/src/com/cloud/user/AccountManagerImpl.java
+++ b/server/src/com/cloud/user/AccountManagerImpl.java
@@ -2138,7 +2138,6 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M
permittedAccounts, Ternary<Long, Boolean, ListProjectResourcesCriteria> domainIdRecursiveListProject,
boolean listAll, boolean forProjectInvitation) {
Long domainId = domainIdRecursiveListProject.first();
-
if (domainId != null) {
Domain domain = _domainDao.findById(domainId);
if (domain == null) {
@@ -2154,10 +2153,13 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M
}
Account userAccount = null;
+ Domain domain = null;
if (domainId != null) {
userAccount = _accountDao.findActiveAccount(accountName, domainId);
+ domain = _domainDao.findById(domainId);
} else {
userAccount = _accountDao.findActiveAccount(accountName, caller.getDomainId());
+ domain = _domainDao.findById(caller.getDomainId());
}
if (userAccount != null) {
@@ -2165,7 +2167,7 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M
//check permissions
permittedAccounts.add(userAccount.getId());
} else {
- throw new InvalidParameterValueException("could not find account " + accountName + " in domain " + domainId);
+ throw new InvalidParameterValueException("could not find account " + accountName + " in domain " + domain.getUuid());
}
}