Author: adrianc
Date: Tue Jan 19 19:01:09 2010
New Revision: 900908
URL:
http://svn.apache.org/viewvc?rev=900908&view=revLog:
Small fixup for user permissions cache.
Modified:
ofbiz/branches/executioncontext20091231/framework/context/src/org/ofbiz/context/AuthorizationManagerImpl.java
Modified: ofbiz/branches/executioncontext20091231/framework/context/src/org/ofbiz/context/AuthorizationManagerImpl.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20091231/framework/context/src/org/ofbiz/context/AuthorizationManagerImpl.java?rev=900908&r1=900907&r2=900908&view=diff==============================================================================
--- ofbiz/branches/executioncontext20091231/framework/context/src/org/ofbiz/context/AuthorizationManagerImpl.java (original)
+++ ofbiz/branches/executioncontext20091231/framework/context/src/org/ofbiz/context/AuthorizationManagerImpl.java Tue Jan 19 19:01:09 2010
@@ -181,7 +181,13 @@
@Override
public void clearUserData(GenericValue userLogin) {
super.clearUserData(userLogin);
- userPermCache.remove(userLogin.getString("userLogin"));
+ Delegator delegator = ThreadContext.getDelegator();
+ Map<String, AccessController> controllerMap = userPermCache.get(delegator.getDelegatorName());
+ if (controllerMap != null) {
+ synchronized (controllerMap) {
+ controllerMap.remove(userLogin.getString("userLogin"));
+ }
+ }
}
@Override
public void createUser(String userLoginId, String password) throws AuthorizationManagerException {