diff --git a/org.adempiere.base/src/org/compiere/model/MRole.java b/org.adempiere.base/src/org/compiere/model/MRole.java index 5c985c99c2..c004383bd9 100644 --- a/org.adempiere.base/src/org/compiere/model/MRole.java +++ b/org.adempiere.base/src/org/compiere/model/MRole.java @@ -68,7 +68,7 @@ public final class MRole extends X_AD_Role implements ImmutablePOSupport /** * */ - private static final long serialVersionUID = -6317084960843429042L; + private static final long serialVersionUID = 7597852750014990009L; /** * Get Default (Client) Role @@ -1455,7 +1455,6 @@ public final class MRole extends X_AD_Role implements ImmutablePOSupport return false; } // isTableAccessLevel - /** * Access to Column * @param AD_Table_ID table @@ -1464,13 +1463,26 @@ public final class MRole extends X_AD_Role implements ImmutablePOSupport * @return true if access */ public boolean isColumnAccess (int AD_Table_ID, int AD_Column_ID, boolean ro) + { + return isColumnAccess(AD_Table_ID, AD_Column_ID, ro, null); + } + + /** + * Access to Column + * @param AD_Table_ID table + * @param AD_Column_ID column + * @param ro read only + * @param trxName + * @return true if access + */ + public boolean isColumnAccess (int AD_Table_ID, int AD_Column_ID, boolean ro, String trxName) { if (!isTableAccess(AD_Table_ID, ro)) // No Access to Table return false; loadColumnAccess(false); // Verify access to process for buttons - MColumn column = MColumn.get(Env.getCtx(), AD_Column_ID); + MColumn column = MColumn.get(Env.getCtx(), AD_Column_ID, trxName); if (column.getAD_Reference_ID() == DisplayType.Button && column.getAD_Process_ID() > 0) { Boolean access = MRole.getDefault().getProcessAccess(column.getAD_Process_ID()); if (access == null) diff --git a/org.adempiere.base/src/org/compiere/print/MPrintFormat.java b/org.adempiere.base/src/org/compiere/print/MPrintFormat.java index 03491e4115..fb85bf42f8 100644 --- a/org.adempiere.base/src/org/compiere/print/MPrintFormat.java +++ b/org.adempiere.base/src/org/compiere/print/MPrintFormat.java @@ -255,7 +255,7 @@ public class MPrintFormat extends X_AD_PrintFormat implements ImmutablePOSupport while (rs.next()) { MPrintFormatItem pfi = new MPrintFormatItem(p_ctx, rs, get_TrxName()); - if (role.isColumnAccess(getAD_Table_ID(), pfi.getAD_Column_ID(), true)) + if (role.isColumnAccess(getAD_Table_ID(), pfi.getAD_Column_ID(), true, get_TrxName())) list.add (pfi); } }