IDEMPIERE-5714 - Archive Viewer - Created By field shows cross tenant data (#1829)

This commit is contained in:
Peter Takács 2023-05-11 03:58:21 +02:00 committed by GitHub
parent 9372743735
commit 2c4e66f8e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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
/**