Bug 13027: ListIsos shouldnt display isos that are not dowloaded when asked for only ready templates.

Status 13027: resolved fixed
Reviewed-By: Kishan
This commit is contained in:
Nitin Mehta 2012-01-19 15:27:57 +05:30
parent 6e96d6892e
commit 09e0fa0962
1 changed files with 2 additions and 2 deletions

View File

@ -127,11 +127,11 @@ public class ListIsosCmd extends BaseListCmd {
public boolean listInReadyState() {
Account account = UserContext.current().getCaller();
// It is account specific if account is admin type and domainId and accountName are not null
boolean isAccountSpecific = (account == null || isAdmin(account.getType())) && (getAccountName() != null) && (getDomainId() != null);
//boolean isAccountSpecific = (account == null || isAdmin(account.getType())) && (getAccountName() != null) && (getDomainId() != null);
// Show only those that are downloaded.
TemplateFilter templateFilter = TemplateFilter.valueOf(getIsoFilter());
boolean onlyReady = (templateFilter == TemplateFilter.featured) || (templateFilter == TemplateFilter.selfexecutable) || (templateFilter == TemplateFilter.sharedexecutable)
|| (templateFilter == TemplateFilter.executable && isAccountSpecific) || (templateFilter == TemplateFilter.community);
|| (templateFilter == TemplateFilter.executable) || (templateFilter == TemplateFilter.community);
return onlyReady;
}