Merge release branch 4.18 to main

* 4.18:
  server: fix mysql error when list Shared templates for project (#8020)
This commit is contained in:
Daan Hoogland 2023-10-03 10:48:09 +02:00
commit 2e9b3d8e08

View File

@ -3786,6 +3786,9 @@ public class QueryManagerImpl extends MutualExclusiveIdsManagerBase implements Q
}
} 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());
} else if (templateFilter == TemplateFilter.executable) {
SearchCriteria<TemplateJoinVO> scc = _templateJoinDao.createSearchCriteria();