Fixed issue 26572:Calls to webservice fails if user has no access to user
authorGuillermo Gil <guillermo.gil@openbravo.com>
Mon, 19 May 2014 09:53:59 +0200
changeset 23054 3e03b90c27d7
parent 23053 e70995bb0b5c
child 23055 927030652194
child 23058 6303d9b2384d
Fixed issue 26572:Calls to webservice fails if user has no access to user

Added AdminMode to isLockedUser
src/org/openbravo/base/secureApp/UserLock.java
--- a/src/org/openbravo/base/secureApp/UserLock.java	Fri May 16 15:45:45 2014 +0000
+++ b/src/org/openbravo/base/secureApp/UserLock.java	Mon May 19 09:53:59 2014 +0200
@@ -199,7 +199,13 @@
   }
 
   public boolean isLockedUser() {
-    return user != null && user.isLocked();
+    // User does not need to check org and client access
+    OBContext.setAdminMode(false);
+    try {
+      return user != null && user.isLocked();
+    } finally {
+      OBContext.restorePreviousMode();
+    }
   }
 
   /**