From a19706d7389a2154e245918a0dd6de7df2b77d5d Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Fri, 16 Jan 2015 18:45:19 -0500 Subject: [PATCH] IDEMPIERE-2406 Recent Items showing windows that role cannot access --- .../src/org/adempiere/webui/dashboard/DPRecentItems.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPRecentItems.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPRecentItems.java index 2fa707fe79..764fe0f1c7 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPRecentItems.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPRecentItems.java @@ -24,6 +24,7 @@ import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.util.ServerPushTemplate; import org.compiere.model.MQuery; import org.compiere.model.MRecentItem; +import org.compiere.model.MRole; import org.compiere.model.MSysConfig; import org.compiere.model.MTable; import org.compiere.util.Env; @@ -227,6 +228,8 @@ public class DPRecentItems extends DashboardPanel implements EventListener ris = MRecentItem.getFromUser(ctx, AD_User_ID); int riShown = 0; for (MRecentItem ri : ris) { + if (ri.getAD_Window_ID() > 0 && MRole.getDefault().getWindowAccess(ri.getAD_Window_ID()) == null) + continue; String label = ri.getLabel(); if (label == null) continue;