From e3690e803b237006dd14ba9677cc07ef4ffccfbd Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 7 Sep 2017 19:32:33 +0200 Subject: [PATCH] IDEMPIERE-3449 - fix login failing when the role in preferences doesn't have any org accessible for the user going into the system --- .../WEB-INF/src/org/adempiere/webui/panel/RolePanel.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/RolePanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/RolePanel.java index 447fa771d1..656c3b3a9a 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/RolePanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/RolePanel.java @@ -143,6 +143,14 @@ public class RolePanel extends Window implements EventListener, Deferrabl this.setId("rolePanel"); this.setSclass("login-box"); + if (! m_show) { + // check if all mandatory fields are ok to not show + if ( lstRole.getSelectedItem() == null || lstRole.getSelectedItem().getValue() == null + || lstClient.getSelectedItem() == null || lstClient.getSelectedItem().getValue() == null + || lstOrganisation.getSelectedItem() == null || lstOrganisation.getSelectedItem().getValue() == null) { + m_show = true; + } + } if (m_show) { AuFocus auf = null; if (lstClient.getItemCount() > 1) {