Skip to content

Commit d4e2aa3

Browse files
Vijayendra BhamidipatiMice Xia
authored andcommitted
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 <mice_xia@tcloudcomputing.com>
1 parent d8103af commit d4e2aa3

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎server/src/com/cloud/user/AccountManagerImpl.java‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2138,7 +2138,6 @@ public void buildACLSearchParameters(Account caller, Long id, String accountName
21382138
permittedAccounts, Ternary<Long, Boolean, ListProjectResourcesCriteria> domainIdRecursiveListProject,
21392139
boolean listAll, boolean forProjectInvitation) {
21402140
Long domainId = domainIdRecursiveListProject.first();
2141-
21422141
if (domainId != null) {
21432142
Domain domain = _domainDao.findById(domainId);
21442143
if (domain == null) {
@@ -2154,18 +2153,21 @@ public void buildACLSearchParameters(Account caller, Long id, String accountName
21542153
}
21552154

21562155
Account userAccount = null;
2156+
Domain domain = null;
21572157
if (domainId != null) {
21582158
userAccount = _accountDao.findActiveAccount(accountName, domainId);
2159+
domain = _domainDao.findById(domainId);
21592160
} else {
21602161
userAccount = _accountDao.findActiveAccount(accountName, caller.getDomainId());
2162+
domain = _domainDao.findById(caller.getDomainId());
21612163
}
21622164

21632165
if (userAccount != null) {
21642166
checkAccess(caller, null, false, userAccount);
21652167
//check permissions
21662168
permittedAccounts.add(userAccount.getId());
21672169
} else {
2168-
throw new InvalidParameterValueException("could not find account " + accountName + " in domain " + domainId);
2170+
throw new InvalidParameterValueException("could not find account " + accountName + " in domain " + domain.getUuid());
21692171
}
21702172
}
21712173

0 commit comments

Comments
 (0)