Optimize fix for CLOUDSTACK-5987. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7bab0bc3 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7bab0bc3 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7bab0bc3
Branch: refs/heads/rbac Commit: 7bab0bc304d8c212b78c0ff3b09241df723e68bf Parents: 63e42d3 Author: Min Chen <min.c...@citrix.com> Authored: Fri Feb 7 16:08:12 2014 -0800 Committer: Min Chen <min.c...@citrix.com> Committed: Fri Feb 7 16:08:12 2014 -0800 ---------------------------------------------------------------------- server/src/com/cloud/api/query/QueryManagerImpl.java | 2 ++ 1 file changed, 2 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7bab0bc3/server/src/com/cloud/api/query/QueryManagerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/api/query/QueryManagerImpl.java b/server/src/com/cloud/api/query/QueryManagerImpl.java index 613ac5d..e2055c7 100644 --- a/server/src/com/cloud/api/query/QueryManagerImpl.java +++ b/server/src/com/cloud/api/query/QueryManagerImpl.java @@ -2871,6 +2871,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService { sc.addAnd("featured", SearchCriteria.Op.EQ, false); } + /* We don't need this any more to check domain id, based on CLOUDSTACK-5987 // for public templates, we should get all public templates from all domains in the system // get all parent domain ID's all the way till root domain List<Long> domainTree = new ArrayList<Long>(); @@ -2887,6 +2888,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService { scc.addOr("domainId", SearchCriteria.Op.IN, domainTree.toArray()); scc.addOr("domainId", SearchCriteria.Op.NULL); sc.addAnd("domainId", SearchCriteria.Op.SC, scc); + */ } else if (templateFilter == TemplateFilter.self || templateFilter == TemplateFilter.selfexecutable) { if (permittedDomains.contains(caller.getDomainId())) { // this caller acts like a domain admin