Skip to content

Commit 7bab0bc

Browse files
committed
Optimize fix for CLOUDSTACK-5987.
1 parent 63e42d3 commit 7bab0bc

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎server/src/com/cloud/api/query/QueryManagerImpl.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2871,6 +2871,7 @@ private Pair<List<TemplateJoinVO>, Integer> searchForTemplatesInternal(Long temp
28712871
sc.addAnd("featured", SearchCriteria.Op.EQ, false);
28722872
}
28732873

2874+
/* We don't need this any more to check domain id, based on CLOUDSTACK-5987
28742875
// for public templates, we should get all public templates from all domains in the system
28752876
// get all parent domain ID's all the way till root domain
28762877
List<Long> domainTree = new ArrayList<Long>();
@@ -2887,6 +2888,7 @@ private Pair<List<TemplateJoinVO>, Integer> searchForTemplatesInternal(Long temp
28872888
scc.addOr("domainId", SearchCriteria.Op.IN, domainTree.toArray());
28882889
scc.addOr("domainId", SearchCriteria.Op.NULL);
28892890
sc.addAnd("domainId", SearchCriteria.Op.SC, scc);
2891+
*/
28902892
} else if (templateFilter == TemplateFilter.self || templateFilter == TemplateFilter.selfexecutable) {
28912893
if (permittedDomains.contains(caller.getDomainId())) {
28922894
// this caller acts like a domain admin

0 commit comments

Comments
 (0)