diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/grid/WQuickEntry.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/grid/WQuickEntry.java index ab54af0d06..439b125ba0 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/grid/WQuickEntry.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/grid/WQuickEntry.java @@ -63,7 +63,7 @@ public class WQuickEntry extends Window implements EventListener, ValueCh /** * */ - private static final long serialVersionUID = 6033101081045706748L; + private static final long serialVersionUID = -8530102231615195037L; public static final String QUICK_ENTRY_MODE = "_QUICK_ENTRY_MODE_"; @@ -85,7 +85,7 @@ public class WQuickEntry extends Window implements EventListener, ValueCh private ConfirmPanel confirmPanel = new ConfirmPanel(true, false, false, false, false, false); - private int m_AD_Window_ID; + protected int m_AD_Window_ID; private boolean isHasField = false; /** diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WPreference.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WPreference.java index bea84e9b6f..201ca09980 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WPreference.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WPreference.java @@ -22,6 +22,7 @@ import org.adempiere.webui.component.Window; import org.adempiere.webui.editor.WYesNoEditor; import org.adempiere.webui.grid.WQuickEntry; import org.adempiere.webui.theme.ThemeManager; +import org.compiere.model.MRole; import org.compiere.model.MUserPreference; import org.compiere.util.CLogger; import org.compiere.util.Env; @@ -65,8 +66,11 @@ public class WPreference extends WQuickEntry implements EventListener { log.log(Level.SEVERE, ex.getMessage()); } - initPOs(); - loadPreferences(); + Boolean canAccessPreference = MRole.getDefault().getWindowAccess(m_AD_Window_ID); + if (canAccessPreference != null && canAccessPreference) { + initPOs(); + loadPreferences(); + } this.setTitle(""); } //WPreference