bug 10410:

same template only shows once in a zone,
and only ready template shows in UI

status 10410: resolved fixed
This commit is contained in:
anthony 2011-06-27 15:49:19 -07:00
parent 615af2971e
commit 7e5d84f2cc
2 changed files with 6 additions and 0 deletions

View File

@ -126,6 +126,8 @@ public class ListIsosCmd extends BaseListCmd {
} }
public boolean listInReadyState() { public boolean listInReadyState() {
return true;
/*
Account account = UserContext.current().getCaller(); Account account = UserContext.current().getCaller();
// It is account specific if account is admin type and domainId and accountName are not null // 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);
@ -134,6 +136,7 @@ public class ListIsosCmd extends BaseListCmd {
boolean onlyReady = (templateFilter == TemplateFilter.featured) || (templateFilter == TemplateFilter.selfexecutable) || (templateFilter == TemplateFilter.sharedexecutable) boolean onlyReady = (templateFilter == TemplateFilter.featured) || (templateFilter == TemplateFilter.selfexecutable) || (templateFilter == TemplateFilter.sharedexecutable)
|| (templateFilter == TemplateFilter.executable && isAccountSpecific) || (templateFilter == TemplateFilter.community); || (templateFilter == TemplateFilter.executable && isAccountSpecific) || (templateFilter == TemplateFilter.community);
return onlyReady; return onlyReady;
*/
} }
///////////////////////////////////////////////////// /////////////////////////////////////////////////////

View File

@ -107,6 +107,8 @@ public class ListTemplatesCmd extends BaseListCmd {
} }
public boolean listInReadyState() { public boolean listInReadyState() {
return true;
/*
Account account = UserContext.current().getCaller(); Account account = UserContext.current().getCaller();
// It is account specific if account is admin type and domainId and accountName are not null // 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);
@ -115,6 +117,7 @@ public class ListTemplatesCmd extends BaseListCmd {
boolean onlyReady = (templateFilter == TemplateFilter.featured) || (templateFilter == TemplateFilter.selfexecutable) || (templateFilter == TemplateFilter.sharedexecutable) boolean onlyReady = (templateFilter == TemplateFilter.featured) || (templateFilter == TemplateFilter.selfexecutable) || (templateFilter == TemplateFilter.sharedexecutable)
|| (templateFilter == TemplateFilter.executable && isAccountSpecific) || (templateFilter == TemplateFilter.community); || (templateFilter == TemplateFilter.executable && isAccountSpecific) || (templateFilter == TemplateFilter.community);
return onlyReady; return onlyReady;
*/
} }
///////////////////////////////////////////////////// /////////////////////////////////////////////////////