Revert caching of users and roles
authorMathieu Baudier <mbaudier@argeo.org>
Sat, 13 Oct 2012 08:36:44 +0000 (08:36 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Sat, 13 Oct 2012 08:36:44 +0000 (08:36 +0000)
git-svn-id: https://svn.argeo.org/commons/trunk@5601 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

security/runtime/org.argeo.security.jackrabbit/src/main/java/org/argeo/security/jackrabbit/ArgeoSecurityManager.java

index 00c674580076d7bcbf7d6bdef5b2a343fc47ca6e..9d3708ed3eaebdcaa4804c8ce00c92f69399dc52 100644 (file)
@@ -46,8 +46,8 @@ public class ArgeoSecurityManager extends DefaultSecurityManager {
                        .getLog(ArgeoSecurityManager.class);
 
        /** TODO? use a bounded buffer */
-       private Map<String, String> userRolesCache = Collections
-                       .synchronizedMap(new HashMap<String, String>());
+//     private Map<String, String> userRolesCache = Collections
+//                     .synchronizedMap(new HashMap<String, String>());
 
        /**
         * Since this is called once when the session is created, we take the
@@ -90,15 +90,15 @@ public class ArgeoSecurityManager extends DefaultSecurityManager {
                        }
 
                        // do not sync if not changed
-                       if (userRolesCache.containsKey(userId)
-                                       && userRolesCache.get(userId).equals(roles.toString()))
-                               return userId;
+//                     if (userRolesCache.containsKey(userId)
+//                                     && userRolesCache.get(userId).equals(roles.toString()))
+//                             return userId;
 
                        // sync Spring and Jackrabbit
                        // workspace is irrelevant here
                        UserManager systemUm = getSystemUserManager(null);
                        syncSpringAndJackrabbitSecurity(systemUm, authen);
-                       userRolesCache.put(userId, roles.toString());
+//                     userRolesCache.put(userId, roles.toString());
                }
                return userId;
        }