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

This commit is contained in:
Min Chen 2014-12-17 22:33:24 -08:00
parent 68b9ba4515
commit d304409c98

View File

@ -3123,8 +3123,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
// if template is not public, perform permission check here // if template is not public, perform permission check here
if (!template.isPublicTemplate() && caller.getType() != Account.ACCOUNT_TYPE_ADMIN) { if (!template.isPublicTemplate() && caller.getType() != Account.ACCOUNT_TYPE_ADMIN) {
Account owner = _accountMgr.getAccount(template.getAccountId()); _accountMgr.checkAccess(caller, null, false, template);
_accountMgr.checkAccess(caller, null, true, owner);
} }
// if templateId is specified, then we will just use the id to // if templateId is specified, then we will just use the id to