From d7bac68f948548c5042a575559e8a3c76740f571 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Mon, 7 Dec 2020 16:00:14 +0100 Subject: [PATCH] IDEMPIERE-4268 Web Services : Read miss cross-tenant check (#442) Problem when creating a preference with SuperUser in System, and then trying to save the same preference in GardenWorld (for example changing the height of a window) --- .../WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java | 2 ++ .../WEB-INF/src/org/adempiere/webui/desktop/DefaultDesktop.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java index 75517a2a3d..122b5c3768 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java @@ -1336,6 +1336,7 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer int userId = Env.getAD_User_ID(Env.getCtx()); MPreference preference = query.setOnlyActiveRecords(true) .setApplyAccessFilter(true) + .setClient_ID() .setParameters(windowId, adTabId+"|DetailPane.IsOpen", userId) .first(); if (preference == null || preference.getAD_Preference_ID() <= 0) { @@ -2035,6 +2036,7 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer int userId = Env.getAD_User_ID(Env.getCtx()); MPreference preference = query.setOnlyActiveRecords(true) .setApplyAccessFilter(true) + .setClient_ID() .setParameters(windowId, adTabId+"|"+attribute, userId) .first(); if (preference == null || preference.getAD_Preference_ID() <= 0) { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DefaultDesktop.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DefaultDesktop.java index c4fdf31a7b..45ce93d631 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DefaultDesktop.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DefaultDesktop.java @@ -463,6 +463,7 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria int userId = Env.getAD_User_ID(Env.getCtx()); MPreference preference = query.setOnlyActiveRecords(true) .setApplyAccessFilter(true) + .setClient_ID() .setParameters("SideController.Width", userId) .first(); @@ -506,6 +507,7 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria int userId = Env.getAD_User_ID(Env.getCtx()); MPreference preference = query.setOnlyActiveRecords(true) .setApplyAccessFilter(true) + .setClient_ID() .setParameters("HelpController.Width", userId) .first();