IDEMPIERE-3895 NPE in fitnesse login fixture when wrong username

This commit is contained in:
Carlos Ruiz 2019-02-16 11:33:39 +01:00
parent ad0ffe1fbf
commit 10f834d36a
1 changed files with 7 additions and 5 deletions

View File

@ -167,6 +167,7 @@ public class Login extends TableFixture {
KeyNamePair[] clients = login.getClients(m_user, m_password);
boolean okclient = false;
KeyNamePair selectedClient = null;
if (clients != null) {
for (KeyNamePair client : clients) {
if (client.getKey() == m_client_id) {
okclient = true;
@ -174,6 +175,7 @@ public class Login extends TableFixture {
break;
}
}
}
if (!okclient)
return "Error logging in - client not allowed for this user";