hg merge 80090351de1c

This commit is contained in:
Carlos Ruiz 2012-09-28 13:49:29 -05:00
commit 0a76dbb1c4
3 changed files with 46 additions and 2 deletions

View File

@ -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
;

View File

@ -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
;

View File

@ -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;
} }