Repository: cloudstack
Updated Branches:
  refs/heads/master 68b9ba451 -> d304409c9


CLOUDSTACK-8093:Not able to list shared templates by passing id.


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

Branch: refs/heads/master
Commit: d304409c98c87e9fb8a4e712cd7f9110c91bd1fa
Parents: 68b9ba4
Author: Min Chen <[email protected]>
Authored: Wed Dec 17 22:33:24 2014 -0800
Committer: Min Chen <[email protected]>
Committed: Thu Dec 18 10:00:18 2014 -0800

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d304409c/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 634b065..a90be50 100644
--- a/server/src/com/cloud/api/query/QueryManagerImpl.java
+++ b/server/src/com/cloud/api/query/QueryManagerImpl.java
@@ -3123,8 +3123,7 @@ public class QueryManagerImpl extends ManagerBase 
implements QueryService {
 
             // if template is not public, perform permission check here
             if (!template.isPublicTemplate() && caller.getType() != 
Account.ACCOUNT_TYPE_ADMIN) {
-                Account owner = 
_accountMgr.getAccount(template.getAccountId());
-                _accountMgr.checkAccess(caller, null, true, owner);
+                _accountMgr.checkAccess(caller, null, false, template);
             }
 
             // if templateId is specified, then we will just use the id to

Reply via email to