IDEMPIERE-373 Implement User Locking - fix locking error message when involving multi-clients user
This commit is contained in:
parent
bf79e2ad22
commit
5b92e3a2d7
|
@ -1372,6 +1372,7 @@ public class Login
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean validButLocked = false;
|
||||||
for (MUser user : users) {
|
for (MUser user : users) {
|
||||||
if (clientsValidated.contains(user.getAD_Client_ID())) {
|
if (clientsValidated.contains(user.getAD_Client_ID())) {
|
||||||
log.severe("Two users with password with the same name/email combination on same tenant: " + app_user);
|
log.severe("Two users with password with the same name/email combination on same tenant: " + app_user);
|
||||||
|
@ -1387,7 +1388,10 @@ public class Login
|
||||||
}
|
}
|
||||||
if (valid ) {
|
if (valid ) {
|
||||||
if (user.isLocked())
|
if (user.isLocked())
|
||||||
|
{
|
||||||
|
validButLocked = true;
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (user.isExpired())
|
if (user.isExpired())
|
||||||
isPasswordExpired = true;
|
isPasswordExpired = true;
|
||||||
|
@ -1462,6 +1466,11 @@ public class Login
|
||||||
log.severe("Failed to update user record with date last login");
|
log.severe("Failed to update user record with date last login");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (validButLocked)
|
||||||
|
{
|
||||||
|
// User account ({0}) is locked, please contact the system administrator
|
||||||
|
loginErrMsg = Msg.getMsg(m_ctx, "UserAccountLocked", new Object[] {app_user});
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
boolean foundLockedAccount = false;
|
boolean foundLockedAccount = false;
|
||||||
|
|
Loading…
Reference in New Issue