Skip to content

Commit 38f3107

Browse files
nvazquezbernardodemarco
authored andcommitted
Fix aaccess to template/ISO list for domain/resource admins
In Apache CloudStack, while using the listTemplates and listIsos APIs, Domain Admins and Resource Admins can retrieve templates and ISOs outside their intended scope. Co-authored-by: bernardodemarco <[email protected]> Co-authored-by: nvazquez <[email protected]>
1 parent 857ccb0 commit 38f3107

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4572,7 +4572,7 @@ else if (!template.isPublicTemplate() && caller.getType() != Account.Type.ADMIN)
45724572
if (!permittedAccounts.isEmpty()) {
45734573
domain = _domainDao.findById(permittedAccounts.get(0).getDomainId());
45744574
} else {
4575-
domain = _domainDao.findById(Domain.ROOT_DOMAIN);
4575+
domain = _domainDao.findById(caller.getDomainId());
45764576
}
45774577

45784578
setIdsListToSearchCriteria(sc, ids);

0 commit comments

Comments
 (0)