Created filter should not be available to all users by default #PL-6314

This commit is contained in:
Maxim Gorbunkov 2015-11-16 14:16:11 +00:00
parent 0cf8d806ba
commit b0716577c6

View File

@ -907,8 +907,8 @@ public class FilterDelegateImpl implements FilterDelegate {
protected void loadFilterEntities() {
LoadContext<FilterEntity> ctx = LoadContext.create(FilterEntity.class);
ctx.setView("app");
ctx.setQueryString("select f from sec$Filter f left join f.user u on u.id = :userId " +
"where f.componentId = :component order by f.name")
ctx.setQueryString("select f from sec$Filter f left join f.user u " +
"where f.componentId = :component and (u.id = :userId or u is null) order by f.name")
.setParameter("component", ComponentsHelper.getFilterComponentPath(filter))
.setParameter("userId", userSessionSource.getUserSession().getCurrentOrSubstitutedUser().getId());