weizhouapache commented on code in PR #8020:
URL: https://github.com/apache/cloudstack/pull/8020#discussion_r1341189692
##########
server/src/main/java/com/cloud/api/query/QueryManagerImpl.java:
##########
@@ -3758,6 +3758,9 @@ else if (!template.isPublicTemplate() && caller.getType()
!= Account.Type.ADMIN)
}
} else if (templateFilter == TemplateFilter.sharedexecutable ||
templateFilter == TemplateFilter.shared) {
// only show templates shared by others
+ if (permittedAccounts.isEmpty()) {
+ return new Pair<>(new ArrayList<>(), 0);
+ }
sc.addAnd("sharedAccountId", SearchCriteria.Op.IN,
permittedAccountIds.toArray());
Review Comment:
@DaanHoogland
no idea. I just verified this change fixes the issue.
if you find another solution, it would be better, I will close this PR in
that case.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]