You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by al...@apache.org on 2013/10/29 18:58:27 UTC

git commit: updated refs/heads/master to e7685f8

Updated Branches:
  refs/heads/master 7e269e377 -> e7685f816


CLOUDSTACK-4988: when listTemplates call is executed by regular user, but templateFilter=community is passed in, return public templates of subdomains


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e7685f81
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e7685f81
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e7685f81

Branch: refs/heads/master
Commit: e7685f816ad7e97a54d05e77fa5a90c841406514
Parents: 7e269e3
Author: Alena Prokharchyk <al...@citrix.com>
Authored: Tue Oct 29 10:45:42 2013 -0700
Committer: Alena Prokharchyk <al...@citrix.com>
Committed: Tue Oct 29 10:58:53 2013 -0700

----------------------------------------------------------------------
 server/src/com/cloud/api/query/QueryManagerImpl.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e7685f81/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 0e3f7c9..51ee249 100644
--- a/server/src/com/cloud/api/query/QueryManagerImpl.java
+++ b/server/src/com/cloud/api/query/QueryManagerImpl.java
@@ -2883,7 +2883,8 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
                     }
 
                     // get all child domain ID's
-                    if (_accountMgr.isAdmin(account.getType())) {
+                    if (_accountMgr.isAdmin(account.getType()) 
+                            || (templateFilter == TemplateFilter.featured || templateFilter == TemplateFilter.community)) {
                         List<DomainVO> allChildDomains = _domainDao.findAllChildren(accountDomain.getPath(),
                                 accountDomain.getId());
                         for (DomainVO childDomain : allChildDomains) {