IDEMPIERE-373 Implement User Locking - fix login error message
This commit is contained in:
parent
a210231735
commit
cb910d298d
|
@ -0,0 +1,22 @@
|
||||||
|
-- Sep 27, 2012 12:32:31 PM SGT
|
||||||
|
-- IDEMPIERE-373 Implement User Locking
|
||||||
|
UPDATE AD_Message SET MsgText='Reached the maximum number of login attempts, user account ({0}) is locked',Updated=TO_DATE('2012-09-27 12:32:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=200033
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 27, 2012 12:32:31 PM SGT
|
||||||
|
-- IDEMPIERE-373 Implement User Locking
|
||||||
|
UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=200033
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 27, 2012 12:32:59 PM SGT
|
||||||
|
-- IDEMPIERE-373 Implement User Locking
|
||||||
|
UPDATE AD_Message SET MsgText='User account ({0}) is locked, please contact the system administrator',Updated=TO_DATE('2012-09-27 12:32:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=200032
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 27, 2012 12:32:59 PM SGT
|
||||||
|
-- IDEMPIERE-373 Implement User Locking
|
||||||
|
UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=200032
|
||||||
|
;
|
||||||
|
|
||||||
|
SELECT register_migration_script('919_IDEMPIERE-373_User_Locking.sql') FROM dual
|
||||||
|
;
|
|
@ -0,0 +1,22 @@
|
||||||
|
-- Sep 27, 2012 12:32:31 PM SGT
|
||||||
|
-- IDEMPIERE-373 Implement User Locking
|
||||||
|
UPDATE AD_Message SET MsgText='Reached the maximum number of login attempts, user account ({0}) is locked',Updated=TO_TIMESTAMP('2012-09-27 12:32:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=200033
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 27, 2012 12:32:31 PM SGT
|
||||||
|
-- IDEMPIERE-373 Implement User Locking
|
||||||
|
UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=200033
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 27, 2012 12:32:59 PM SGT
|
||||||
|
-- IDEMPIERE-373 Implement User Locking
|
||||||
|
UPDATE AD_Message SET MsgText='User account ({0}) is locked, please contact the system administrator',Updated=TO_TIMESTAMP('2012-09-27 12:32:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=200032
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Sep 27, 2012 12:32:59 PM SGT
|
||||||
|
-- IDEMPIERE-373 Implement User Locking
|
||||||
|
UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=200032
|
||||||
|
;
|
||||||
|
|
||||||
|
SELECT register_migration_script('919_IDEMPIERE-373_User_Locking.sql') FROM dual
|
||||||
|
;
|
|
@ -1468,7 +1468,7 @@ public class Login
|
||||||
{
|
{
|
||||||
if (user.isLocked())
|
if (user.isLocked())
|
||||||
{
|
{
|
||||||
// User account '{0}' is locked, please contact the system administrator
|
// User account ({0}) is locked, please contact the system administrator
|
||||||
loginErrMsg = Msg.getMsg(m_ctx, "UserAccountLocked", new Object[] {app_user});
|
loginErrMsg = Msg.getMsg(m_ctx, "UserAccountLocked", new Object[] {app_user});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1479,7 +1479,7 @@ public class Login
|
||||||
int MAX_LOGIN_ATTEMPT = MSysConfig.getIntValue(MSysConfig.USER_LOCKING_MAX_LOGIN_ATTEMPT, 0);
|
int MAX_LOGIN_ATTEMPT = MSysConfig.getIntValue(MSysConfig.USER_LOCKING_MAX_LOGIN_ATTEMPT, 0);
|
||||||
if (MAX_LOGIN_ATTEMPT > 0 && count >= MAX_LOGIN_ATTEMPT)
|
if (MAX_LOGIN_ATTEMPT > 0 && count >= MAX_LOGIN_ATTEMPT)
|
||||||
{
|
{
|
||||||
// Reached the maximum number of login attempts, user account '{0}' is locked
|
// Reached the maximum number of login attempts, user account ({0}) is locked
|
||||||
loginErrMsg = Msg.getMsg(m_ctx, "ReachedMaxLoginAttempts", new Object[] {app_user});
|
loginErrMsg = Msg.getMsg(m_ctx, "ReachedMaxLoginAttempts", new Object[] {app_user});
|
||||||
reachMaxAttempt = true;
|
reachMaxAttempt = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue