details:   https://code.openbravo.com/erp/devel/pi/rev/cac29d3b353e
changeset: 17616:cac29d3b353e
user:      Augusto Mauch <augusto.mauch <at> openbravo.com>
date:      Tue Aug 07 14:56:07 2012 +0200
summary:   Related to issue 21313: Utility.messageBD used in some hardcoded 
messages

diffstat:

 src/org/openbravo/authentication/basic/DefaultAuthenticationManager.java |  15 
++++++---
 1 files changed, 10 insertions(+), 5 deletions(-)

diffs (31 lines):

diff -r 64bd1fa3cf1f -r cac29d3b353e 
src/org/openbravo/authentication/basic/DefaultAuthenticationManager.java
--- a/src/org/openbravo/authentication/basic/DefaultAuthenticationManager.java  
Mon Aug 06 16:21:39 2012 +0530
+++ b/src/org/openbravo/authentication/basic/DefaultAuthenticationManager.java  
Tue Aug 07 14:56:07 2012 +0200
@@ -82,17 +82,22 @@
 
       if (LoginUtils.checkUserPassword(conn, strUser, strPass) == null) {
         log4j.debug("Failed user/password. Username: " + strUser + " - Session 
ID:" + sessionId);
-        errorMsg.setTitle("IDENTIFICATION_FAILURE_TITLE");
-        errorMsg.setMessage("IDENTIFICATION_FAILURE_MSG");
+        errorMsg.setTitle(Utility.messageBD(this.conn, 
"IDENTIFICATION_FAILURE_TITLE",
+            variables.getLanguage()));
+        errorMsg.setMessage(Utility.messageBD(this.conn, 
"IDENTIFICATION_FAILURE_MSG",
+            variables.getLanguage()));
       } else {
         log4j.debug(strUser + " is locked cannot activate session ID " + 
sessionId);
-        errorMsg.setTitle("LOCKED_USER_TITLE");
-        errorMsg.setMessage("LOCKED_USER_MSG");
+        errorMsg
+            .setTitle(Utility.messageBD(this.conn, "LOCKED_USER_TITLE", 
variables.getLanguage()));
+        errorMsg
+            .setMessage(Utility.messageBD(this.conn, "LOCKED_USER_MSG", 
variables.getLanguage()));
         updateDBSession(sessionId, false, "LU");
       }
 
       // throw error message will be caught by LoginHandler
-      throw new AuthenticationException(Utility.messageBD(this.conn, 
"IDENTIFICATION_FAILURE_TITLE", variables.getLanguage()), errorMsg);
+      throw new AuthenticationException(Utility.messageBD(this.conn,
+          "IDENTIFICATION_FAILURE_TITLE", variables.getLanguage()), errorMsg);
     }
 
     // Using the Servlet API instead of vars.setSessionValue to avoid breaking 
code

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to