mirror of https://github.com/apache/cloudstack.git
bug 6450: list all snapshot for admin
status 6450: resolved fixed
This commit is contained in:
parent
e1513645a0
commit
e6b1add27f
|
|
@ -87,16 +87,13 @@ public class ListSnapshotsCmd extends BaseCmd {
|
|||
}
|
||||
|
||||
Long accountId = null;
|
||||
if ((account == null) || isAdmin(account.getType())) {
|
||||
if(account != null && account.getType() == Account.ACCOUNT_TYPE_DOMAIN_ADMIN)
|
||||
accountId = account.getId();
|
||||
if (account == null) {
|
||||
if (domainId != null && accountName != null) {
|
||||
Account userAccount = getManagementServer().findAccountByName(accountName, domainId);
|
||||
if (userAccount != null) {
|
||||
accountId = userAccount.getId();
|
||||
}
|
||||
account = getManagementServer().findAccountByName(accountName, domainId);
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
if( account != null && !isAdmin(account.getType())) {
|
||||
accountId = account.getId();
|
||||
}
|
||||
|
||||
|
|
@ -118,8 +115,8 @@ public class ListSnapshotsCmd extends BaseCmd {
|
|||
c.addCriteria(Criteria.NAME, name);
|
||||
c.addCriteria(Criteria.ID, id);
|
||||
c.addCriteria(Criteria.KEYWORD, keyword);
|
||||
c.addCriteria(Criteria.ACCOUNTID, accountId);
|
||||
|
||||
c.addCriteria(Criteria.ACCOUNTID, accountId);
|
||||
|
||||
List<SnapshotVO> snapshots = null;
|
||||
try {
|
||||
snapshots = getManagementServer().listSnapshots(c, interval);
|
||||
|
|
|
|||
Loading…
Reference in New Issue