IDEMPIERE-4752 : Cross tenant error fix while importing client data … (#643)
* IDEMPIERE-4752 : Cross tenant error fix while importing client data 2pack * Update PackInHandler.java Co-authored-by: Carlos Ruiz <carg67@gmail.com>
This commit is contained in:
parent
9742c0dbc9
commit
26f88e6fd2
|
@ -521,9 +521,12 @@ public class PackInHandler extends DefaultHandler {
|
||||||
if (!isUpdateRoleAccess)
|
if (!isUpdateRoleAccess)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
List<MRole> roles = new Query(m_ctx.ctx, MRole.Table_Name, "IsManual='N'", m_ctx.trx.getTrxName())
|
int AD_Client_ID=Env.getAD_Client_ID(Env.getCtx());
|
||||||
|
|
||||||
|
List<MRole> roles = new Query(m_ctx.ctx, MRole.Table_Name, "IsManual='N' AND (?=0 OR AD_Client_ID=?)", m_ctx.trx.getTrxName())
|
||||||
.setOnlyActiveRecords(true)
|
.setOnlyActiveRecords(true)
|
||||||
.setOrderBy("AD_Client_ID, Name")
|
.setOrderBy("AD_Client_ID, Name")
|
||||||
|
.setParameters(AD_Client_ID, AD_Client_ID)
|
||||||
.list();
|
.list();
|
||||||
for (MRole role : roles) {
|
for (MRole role : roles) {
|
||||||
role.updateAccessRecords(false);
|
role.updateAccessRecords(false);
|
||||||
|
|
Loading…
Reference in New Issue