details:   https://code.openbravo.com/erp/devel/pi/rev/7c643865432a
changeset: 16784:7c643865432a
user:      Iván Perdomo <ivan.perdomo <at> openbravo.com>
date:      Thu Jun 07 19:04:43 2012 +0200
summary:   Issue 20704: Restore removed code
- The template of Openbravo.properties has the property authentication.class=
  that is not the same of null (not defined)
- If we remove this code, every instance using the default template will get an
  exception when login since it will try to create a new instance of an empty 
string

diffstat:

 src/org/openbravo/authentication/AuthenticationManager.java |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (14 lines):

diff -r 83c7ecc347e6 -r 7c643865432a 
src/org/openbravo/authentication/AuthenticationManager.java
--- a/src/org/openbravo/authentication/AuthenticationManager.java       Thu Jun 
07 18:25:04 2012 +0200
+++ b/src/org/openbravo/authentication/AuthenticationManager.java       Thu Jun 
07 19:04:43 2012 +0200
@@ -70,6 +70,10 @@
     AuthenticationManager authManager;
     String authClass = 
OBPropertiesProvider.getInstance().getOpenbravoProperties()
         .getProperty("authentication.class", DEFAULT_AUTH_CLASS);
+    if (authClass == null || authClass.equals("")) {
+      // If not defined, load default
+      authClass = 
"org.openbravo.authentication.basic.DefaultAuthenticationManager";
+    }
     try {
       authManager = (AuthenticationManager) 
OBClassLoader.getInstance().loadClass(authClass)
           .newInstance();

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