mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-4988: when listTemplates call is executed by regular user, but templateFilter=community is passed in, return public templates of subdomains
This commit is contained in:
parent
375a59d2f7
commit
e5c0de6a2d
|
|
@ -2827,7 +2827,8 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
|
|||
}
|
||||
|
||||
// get all child domain ID's
|
||||
if (_accountMgr.isAdmin(account.getType())) {
|
||||
if (_accountMgr.isAdmin(account.getType())
|
||||
|| (templateFilter == TemplateFilter.featured || templateFilter == TemplateFilter.community)) {
|
||||
List<DomainVO> allChildDomains = _domainDao.findAllChildren(accountDomain.getPath(),
|
||||
accountDomain.getId());
|
||||
for (DomainVO childDomain : allChildDomains) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue