From 2c4e66f8e2c10637846cab54d56074f6bc832ef1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Tak=C3=A1cs?= <93127072+PeterTakacs300@users.noreply.github.com> Date: Thu, 11 May 2023 03:58:21 +0200 Subject: [PATCH] IDEMPIERE-5714 - Archive Viewer - Created By field shows cross tenant data (#1829) --- org.adempiere.ui/src/org/compiere/apps/form/Archive.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/org.adempiere.ui/src/org/compiere/apps/form/Archive.java b/org.adempiere.ui/src/org/compiere/apps/form/Archive.java index f9cc13ce67..ad4acfa8b0 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/Archive.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/Archive.java @@ -115,12 +115,12 @@ public class Archive { { // Internal Users String sql = "SELECT AD_User_ID, Name " - + "FROM AD_User u WHERE EXISTS " + + "FROM AD_User u WHERE u.AD_Client_ID IN(0,?) AND EXISTS " +"(SELECT * FROM AD_User_Roles ur WHERE u.AD_User_ID=ur.AD_User_ID) " + "ORDER BY 2"; MRole role = MRole.getDefault(); sql = role.addAccessSQL(sql, "u", true, false); - return DB.getKeyNamePairs(m_trxName, sql, true); + return DB.getKeyNamePairs(m_trxName, sql, true, Env.getAD_Client_ID(Env.getCtx())); } // dynInit /**