From b0716577c6d328c6ef349447b8a57d3e413ca07a Mon Sep 17 00:00:00 2001 From: Maxim Gorbunkov Date: Mon, 16 Nov 2015 14:16:11 +0000 Subject: [PATCH] Created filter should not be available to all users by default #PL-6314 --- .../cuba/gui/components/filter/FilterDelegateImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/gui/src/com/haulmont/cuba/gui/components/filter/FilterDelegateImpl.java b/modules/gui/src/com/haulmont/cuba/gui/components/filter/FilterDelegateImpl.java index 3a1b1a6952..53e81b82e3 100644 --- a/modules/gui/src/com/haulmont/cuba/gui/components/filter/FilterDelegateImpl.java +++ b/modules/gui/src/com/haulmont/cuba/gui/components/filter/FilterDelegateImpl.java @@ -907,8 +907,8 @@ public class FilterDelegateImpl implements FilterDelegate { protected void loadFilterEntities() { LoadContext 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());