Skip to content

Commit d304409

Browse files
committed
CLOUDSTACK-8093:Not able to list shared templates by passing id.
1 parent 68b9ba4 commit d304409

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3123,8 +3123,7 @@ private Pair<List<TemplateJoinVO>, Integer> searchForTemplatesInternal(Long temp
31233123

31243124
// if template is not public, perform permission check here
31253125
if (!template.isPublicTemplate() && caller.getType() != Account.ACCOUNT_TYPE_ADMIN) {
3126-
Account owner = _accountMgr.getAccount(template.getAccountId());
3127-
_accountMgr.checkAccess(caller, null, true, owner);
3126+
_accountMgr.checkAccess(caller, null, false, template);
31283127
}
31293128

31303129
// if templateId is specified, then we will just use the id to

0 commit comments

Comments
 (0)