]> git.argeo.org Git - lgpl/argeo-commons.git/blobdiff - security/runtime/org.argeo.security.ldap/src/main/java/org/argeo/security/ldap/jcr/JcrUserDetailsContextMapper.java
Fix some small bugs and add some comments on LDAP/JCR session synchronizing process.
[lgpl/argeo-commons.git] / security / runtime / org.argeo.security.ldap / src / main / java / org / argeo / security / ldap / jcr / JcrUserDetailsContextMapper.java
index ec4255af9a6a1777583f058fda55cae186e2e902..5c6a88585ab4c4403fd251eff6edd72b3fa15cbe 100644 (file)
@@ -13,7 +13,6 @@ import javax.jcr.Node;
 import javax.jcr.Property;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
-import javax.jcr.nodetype.NodeType;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -115,14 +114,15 @@ public class JcrUserDetailsContextMapper implements UserDetailsContextMapper,
                                userHome = JcrUtils.createUserHome(session, homeBasePath,
                                                username);
                        String userHomePath = userHome.getPath();
-                       Node userProfile = userHome.getNode(ARGEO_PROFILE);
+                       Node userProfile;  // = userHome.getNode(ARGEO_PROFILE);
                        if (userHome.hasNode(ARGEO_PROFILE)) {
                                userProfile = userHome.getNode(ARGEO_PROFILE);
                        } else {
-                               userProfile = userHome.addNode(ARGEO_PROFILE);
-                               userProfile.addMixin(NodeType.MIX_TITLE);
-                               userProfile.addMixin(NodeType.MIX_CREATED);
-                               userProfile.addMixin(NodeType.MIX_LAST_MODIFIED);
+                               throw new ArgeoException("We should never reach this point");
+                               // userProfile = userHome.addNode(ARGEO_PROFILE);
+                               // userProfile.addMixin(NodeType.MIX_TITLE);
+                               // userProfile.addMixin(NodeType.MIX_CREATED);
+                               // userProfile.addMixin(NodeType.MIX_LAST_MODIFIED);
                        }
 
                        for (String jcrProperty : propertyToAttributes.keySet())