portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r702908 - in /portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade: components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/lda...
Date Wed, 08 Oct 2008 15:25:07 GMT
Author: ddam
Date: Wed Oct  8 08:25:07 2008
New Revision: 702908

URL: http://svn.apache.org/viewvc?rev=702908&view=rev
Log:
- add ability to add hierarchical entity structures in LDAP by adding an entity under an existing
entity (parent)
- clean up code, add / fix some exceptions

Added:
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/util/
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/util/DnUtils.java
  (with props)
Modified:
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/SecurityEntityManager.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/EntityFactoryImpl.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/DefaultLDAPEntityManager.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/impl/AttributeBasedRelationDAO.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/impl/SpringLDAPEntityDAO.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/model/impl/EntityImpl.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/mapping/ldap/AbstractLDAPTest.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/mapping/ldap/setup1/AbstractSetup1LDAPTest.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/mapping/ldap/setup2/AbstractSetup2LDAPTest.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/mapping/ldap/setup2/UserTests.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/mapping/ldap/setup2/resources/setup2.ldif
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/etc/ldif/jetspeed-example.ldif

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/SecurityEntityManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/SecurityEntityManager.java?rev=702908&r1=702907&r2=702908&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/SecurityEntityManager.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/SecurityEntityManager.java
Wed Oct  8 08:25:07 2008
@@ -39,7 +39,9 @@
     Collection<Entity> getAllEntities(String entityType);
 
     void addEntity(Entity entity) throws SecurityException;
-    
+
+    void addEntity(Entity entity, Entity parentEntity) throws SecurityException;
+
     void removeEntity(Entity entity) throws SecurityException;
     
     void updateEntity(Entity entity) throws SecurityException;

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/EntityFactoryImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/EntityFactoryImpl.java?rev=702908&r1=702907&r2=702908&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/EntityFactoryImpl.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/EntityFactoryImpl.java
Wed Oct  8 08:25:07 2008
@@ -32,12 +32,14 @@
 import org.apache.jetspeed.security.SecurityAttributes;
 import org.apache.jetspeed.security.mapping.EntityFactory;
 import org.apache.jetspeed.security.mapping.ldap.dao.LDAPEntityDAOConfiguration;
+import org.apache.jetspeed.security.mapping.ldap.util.DnUtils;
 import org.apache.jetspeed.security.mapping.model.Attribute;
 import org.apache.jetspeed.security.mapping.model.AttributeDef;
 import org.apache.jetspeed.security.mapping.model.Entity;
 import org.apache.jetspeed.security.mapping.model.impl.AttributeImpl;
 import org.apache.jetspeed.security.mapping.model.impl.EntityImpl;
 import org.springframework.ldap.core.DirContextOperations;
+import org.springframework.ldap.core.DistinguishedName;
 import org.springframework.ldap.support.LdapUtils;
 
 /**

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/DefaultLDAPEntityManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/DefaultLDAPEntityManager.java?rev=702908&r1=702907&r2=702908&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/DefaultLDAPEntityManager.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/DefaultLDAPEntityManager.java
Wed Oct  8 08:25:07 2008
@@ -179,6 +179,26 @@
         }
     }
 
+    public void addEntity(Entity entity, Entity parentEntity) throws SecurityException
+    {
+        EntityDAO parentEntityDao = getDAOForEntity(parentEntity);
+        Entity liveParentEntity = null;
+        if (parentEntityDao!=null){
+            // fetch "live" entity from LDAP to 
+            // 1) check whether entity exists and 
+            // 2) fetch all LDAP attributes (mapped and not mapped) + fill the internal ID
+            liveParentEntity=parentEntityDao.getEntity(parentEntity.getId());
+            if (liveParentEntity == null){
+                throw new SecurityException(SecurityException.PRINCIPAL_DOES_NOT_EXIST.createScoped(parentEntity.getType(),
parentEntity.getId()));
+            }
+            EntityDAO dao = getDAOForEntity(entity);
+            if (dao != null)
+            {
+                dao.add(entity,liveParentEntity);
+            }
+        }         
+    }
+
     public void setEntityDAOs(Map<String, EntityDAO> entityDAOs)
     {
         this.entityDAOs = entityDAOs;

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/impl/AttributeBasedRelationDAO.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/impl/AttributeBasedRelationDAO.java?rev=702908&r1=702907&r2=702908&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/impl/AttributeBasedRelationDAO.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/impl/AttributeBasedRelationDAO.java
Wed Oct  8 08:25:07 2008
@@ -128,7 +128,7 @@
             throw new SecurityException(SecurityException.PRINCIPAL_DOES_NOT_EXIST.createScoped(transientEntity.getType(),
transientEntity.getId()));
         }
         if (liveEntity.getInternalId() == null){
-            throw new SecurityException(SecurityException.UNEXPECTED);
+            throw new SecurityException(SecurityException.UNEXPECTED.create(getClass().getName(),"getLiveEntity","Internal
ID not found"));
         }
         return liveEntity;
     }

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/impl/SpringLDAPEntityDAO.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/impl/SpringLDAPEntityDAO.java?rev=702908&r1=702907&r2=702908&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/impl/SpringLDAPEntityDAO.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/impl/SpringLDAPEntityDAO.java
Wed Oct  8 08:25:07 2008
@@ -236,7 +236,7 @@
         } finally{
             Thread.currentThread().setContextClassLoader(currentClassLoader);
         }
-        if (dirCtxOps == null) { throw new SecurityException(SecurityException.UNEXPECTED);
}
+        if (dirCtxOps == null) { throw new SecurityException(SecurityException.PRINCIPAL_DOES_NOT_EXIST.createScoped(entity.getType(),
entity.getId())); }
 
         Collection<ModificationItem> modItems = getModItems(entity, dirCtxOps, umode);
         try
@@ -251,12 +251,16 @@
 
     public void add(Entity entity, Entity parentEntity) throws SecurityException
     {
-        // TODO need to be implemented
+        if (parentEntity == null || parentEntity.getInternalId() == null){
+            throw new SecurityException(SecurityException.UNEXPECTED.create(getClass().getName(),"add(Entity
entity, Entity parentEntity)","Provided parent entity is null or has no internal ID."));
+        }        
+        DistinguishedName parentDn = new DistinguishedName(parentEntity.getInternalId());
+        parentDn.removeFirst(new DistinguishedName(configuration.getBaseDN()));
+        internalAdd(entity,parentDn);        
     }
 
     public void add(Entity entity) throws SecurityException
     {
-        if (entityExists(entity)) { throw new SecurityException(SecurityException.PRINCIPAL_ALREADY_EXISTS.createScoped(entity.getType(),
entity.getId())); }
         DistinguishedName dn = new DistinguishedName();
         if (configuration.getSearchDN() != null && configuration.getSearchDN().length()
> 0)
         {
@@ -265,10 +269,15 @@
                 dn.addAll(new DistinguishedName(configuration.getSearchDN()));
             } catch (InvalidNameException inex)
             {
-                // TODO throw exception
-                dn = null;
+                throw new SecurityException(SecurityException.UNEXPECTED.create(getClass().getName(),"add(Entity
entity)",inex));
             }
         }
+        internalAdd(entity, dn);
+    }
+    
+    public void internalAdd(Entity entity, DistinguishedName dn) throws SecurityException
+    {
+        if (entityExists(entity)) { throw new SecurityException(SecurityException.PRINCIPAL_ALREADY_EXISTS.createScoped(entity.getType(),
entity.getId())); }
         DirContextAdapter context = new DirContextAdapter();
         if (dn != null)
         {

Added: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/util/DnUtils.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/util/DnUtils.java?rev=702908&view=auto
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/util/DnUtils.java
(added)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/util/DnUtils.java
Wed Oct  8 08:25:07 2008
@@ -0,0 +1,44 @@
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.security.mapping.ldap.util;
+
+import org.springframework.ldap.core.DistinguishedName;
+
+
+/**
+ * @author <a href="mailto:ddam@apache.org">Dennis Dam</a>
+ * @version $Id$
+ */
+
+public class DnUtils
+{
+    public static final String DEFAULT_SEPARATOR =  ",";
+    
+    public static final String encodeDnUsingSeparator(String separator, String... dnParts){
+        DistinguishedName dn = new DistinguishedName();
+        for (String dnPart : dnParts)
+        {
+            dn.append(new DistinguishedName(dnPart));
+        }
+        String encodedDn = dn.encode();
+        return encodedDn.replace(", ", separator);
+    }
+
+    public static final String encodeDn(String... dnParts){
+        return encodeDnUsingSeparator(DEFAULT_SEPARATOR, dnParts);
+    }
+}

Propchange: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/util/DnUtils.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/util/DnUtils.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/model/impl/EntityImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/model/impl/EntityImpl.java?rev=702908&r1=702907&r2=702908&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/model/impl/EntityImpl.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/model/impl/EntityImpl.java
Wed Oct  8 08:25:07 2008
@@ -22,6 +22,7 @@
 import java.util.Map;
 import java.util.Set;
 
+import org.apache.jetspeed.security.mapping.ldap.util.DnUtils;
 import org.apache.jetspeed.security.mapping.model.Attribute;
 import org.apache.jetspeed.security.mapping.model.AttributeDef;
 import org.apache.jetspeed.security.mapping.model.Entity;
@@ -154,6 +155,9 @@
 
     public void setInternalId(String internalId)
     {
+        if (internalId != null){
+            internalId = DnUtils.encodeDn(internalId);
+        }
         this.internalId = internalId;
     }
 

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/mapping/ldap/AbstractLDAPTest.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/mapping/ldap/AbstractLDAPTest.java?rev=702908&r1=702907&r2=702908&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/mapping/ldap/AbstractLDAPTest.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/mapping/ldap/AbstractLDAPTest.java
Wed Oct  8 08:25:07 2008
@@ -60,9 +60,6 @@
     public static final AttributeDefImpl UNIQUEMEMBER_ATTR_DEF = new AttributeDefImpl(
     "uniqueMember",true).cfgRequired(true).cfgRequiredDefaultValue("uid=someDummyValue");
 
-    public static final AttributeDefImpl J2_ROLE_DEF = new AttributeDefImpl(
-            "j2-role",true); // multi-valued attribute
-
     protected LdapTemplate ldapTemplate;
 
     protected ContextSource contextSource;

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/mapping/ldap/setup1/AbstractSetup1LDAPTest.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/mapping/ldap/setup1/AbstractSetup1LDAPTest.java?rev=702908&r1=702907&r2=702908&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/mapping/ldap/setup1/AbstractSetup1LDAPTest.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/mapping/ldap/setup1/AbstractSetup1LDAPTest.java
Wed Oct  8 08:25:07 2008
@@ -119,7 +119,6 @@
 
         // hasRole relation DAO
         hasRoleDAO = new AttributeBasedRelationDAO();
-        hasRoleDAO.setLdapTemplate(ldapTemplate);
         hasRoleDAO.setRelationAttribute("uniqueMember");
         // use attribute on target entity (of "role" type); user IDs are stored
         // in a multi-valued attribute on roles.

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/mapping/ldap/setup2/AbstractSetup2LDAPTest.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/mapping/ldap/setup2/AbstractSetup2LDAPTest.java?rev=702908&r1=702907&r2=702908&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/mapping/ldap/setup2/AbstractSetup2LDAPTest.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/mapping/ldap/setup2/AbstractSetup2LDAPTest.java
Wed Oct  8 08:25:07 2008
@@ -49,8 +49,12 @@
 
     protected Set<AttributeDef> roleAttrDefs;
 
+    protected Set<AttributeDef> groupAttrDefs;
+
     protected AttributeBasedRelationDAO hasRoleDAO;
 
+    protected AttributeBasedRelationDAO isMemberOfGroupDAO;
+
     public Resource[] initializationData()
     {
         final ClassPathResource ldapPersonInfo = new ClassPathResource(
@@ -71,16 +75,16 @@
         userAttrDefs = new HashSet<AttributeDef>();
         userAttrDefs.addAll(basicAttrDefs);
         userAttrDefs.add(GIVEN_NAME_DEF);
-        userAttrDefs.add(J2_ROLE_DEF);
 
         userSearchConfig = new LDAPEntityDAOConfiguration();
         userSearchConfig.setBaseDN("o=sevenSeas");
         userSearchConfig.setSearchDN("");
         userSearchConfig.setSearchFilter(new SimpleFilter(
-                "(objectClass=jetspeed-2-user)"));
+                "(objectClass=inetOrgPerson)"));
         userSearchConfig.setLdapIdAttribute("uid");
         userSearchConfig.setAttributeDefinitions(userAttrDefs);
         userSearchConfig.setEntityType("user");
+        userSearchConfig.setObjectClasses("inetOrgPerson,organizationalPerson,person,top");
 
         SpringLDAPEntityDAO userDAO = new SpringLDAPEntityDAO(userSearchConfig);
         userDAO.setLdapTemplate(ldapTemplate);
@@ -93,22 +97,47 @@
 
         LDAPEntityDAOConfiguration roleSearchConfig = new LDAPEntityDAOConfiguration();
         roleSearchConfig.setBaseDN("o=sevenSeas");
-        roleSearchConfig.setSearchDN("");
+        roleSearchConfig.setSearchDN("ou=Roles,o=Jetspeed");
         roleSearchConfig.setSearchFilter(new SimpleFilter(
-                "(objectClass=jetspeed-2-role)"));
-        roleSearchConfig.setLdapIdAttribute("uid");
+                "(objectClass=groupOfUniqueNames)"));
+        roleSearchConfig.setLdapIdAttribute("cn");
         roleSearchConfig.setAttributeDefinitions(roleAttrDefs);
         roleSearchConfig.setEntityType("role");
+        roleSearchConfig.setObjectClasses("groupOfUniqueNames,extensibleObject");
 
         SpringLDAPEntityDAO roleDAO = new SpringLDAPEntityDAO(roleSearchConfig);
         roleDAO.setLdapTemplate(ldapTemplate);
 
+        groupAttrDefs = new HashSet<AttributeDef>();
+        groupAttrDefs.addAll(basicAttrDefs);
+        groupAttrDefs.add(DESCRIPTION_ATTR_DEF);
+        groupAttrDefs.add(UNIQUEMEMBER_ATTR_DEF);
+
+        LDAPEntityDAOConfiguration groupSearchConfig = new LDAPEntityDAOConfiguration();
+        groupSearchConfig.setBaseDN("o=sevenSeas");
+        groupSearchConfig.setSearchDN("ou=Groups,o=Jetspeed");
+        groupSearchConfig.setSearchFilter(new SimpleFilter(
+                "(objectClass=groupOfUniqueNames)"));
+        groupSearchConfig.setLdapIdAttribute("cn");
+        groupSearchConfig.setAttributeDefinitions(groupAttrDefs);
+        groupSearchConfig.setEntityType("group");
+        groupSearchConfig.setObjectClasses("groupOfUniqueNames,extensibleObject");
+        
+        SpringLDAPEntityDAO groupDAO = new SpringLDAPEntityDAO(groupSearchConfig);
+        groupDAO.setLdapTemplate(ldapTemplate);
+
         Map<String, EntityDAO> daos = new HashMap<String, EntityDAO>();
         daos.put("user", userDAO);
         daos.put("role", roleDAO);
 
         entityManager = new DefaultLDAPEntityManager();
         entityManager.setEntityDAOs(daos);
+        daos.put("user", userDAO);
+        daos.put("role", roleDAO);
+        daos.put("group", groupDAO);
+
+        entityManager = new DefaultLDAPEntityManager();
+        entityManager.setEntityDAOs(daos);
 
         // relation DAOs
         Collection<EntityRelationDAO> relationDaos = new ArrayList<EntityRelationDAO>();
@@ -117,11 +146,10 @@
         // use attribute on from entity (of "user" type); user IDs are stored
         // in the "j2-role" attribute
         hasRoleDAO = new AttributeBasedRelationDAO();
-        hasRoleDAO.setLdapTemplate(ldapTemplate);
-        hasRoleDAO.setRelationAttribute("j2-role");
-        hasRoleDAO.setUseFromEntityAttribute(true);
+        hasRoleDAO.setRelationAttribute("uniqueMember");
+        hasRoleDAO.setUseFromEntityAttribute(false);
         hasRoleDAO.setRelationType(new SecurityEntityRelationTypeImpl("hasRole","user","role"));
-        hasRoleDAO.setAttributeContainsInternalId(false);
+        hasRoleDAO.setAttributeContainsInternalId(true);
         relationDaos.add(hasRoleDAO);
 
         entityManager.setEntityRelationDAOs(relationDaos);

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/mapping/ldap/setup2/UserTests.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/mapping/ldap/setup2/UserTests.java?rev=702908&r1=702907&r2=702908&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/mapping/ldap/setup2/UserTests.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/mapping/ldap/setup2/UserTests.java
Wed Oct  8 08:25:07 2008
@@ -19,8 +19,10 @@
 import java.util.ArrayList;
 import java.util.Collection;
 
+import org.apache.jetspeed.security.mapping.ldap.util.DnUtils;
 import org.apache.jetspeed.security.mapping.model.Entity;
 import org.apache.jetspeed.security.mapping.model.impl.EntityImpl;
+import org.springframework.ldap.core.DistinguishedName;
 
 
 /**
@@ -32,60 +34,73 @@
 
     public void testSingleUser() throws Exception
     {
-        EntityImpl sampleUser = new EntityImpl("user", "someManager", userAttrDefs);
+        EntityImpl sampleUser = new EntityImpl("user", "thomas", userAttrDefs);
         sampleUser
-                .setInternalId("cn=someManager, ou=People, ou=rootOrg, o=sevenSeas");
-        sampleUser.setAttribute(GIVEN_NAME_DEF.getName(), "Some Manager");
-        sampleUser.setAttribute(UID_DEF.getName(), "someManager");
-        sampleUser.setAttribute(CN_DEF.getName(), "someManager");
-        Collection<String> roles = new ArrayList<String>();
-        roles.add("manager");
-        roles.add("user");
-        sampleUser.setAttribute(J2_ROLE_DEF.getName(), roles);
+                .setInternalId("cn=Thomas, o=Peoples, o=Amsterdam, o=Jetspeed, o=sevenSeas");
+        sampleUser.setAttribute(GIVEN_NAME_DEF.getName(), "Thomas");
+        sampleUser.setAttribute(UID_DEF.getName(), "thomas");
+        sampleUser.setAttribute(CN_DEF.getName(), "Thomas");
         basicTestCases.testFetchSingleEntity(entityManager, sampleUser);
     }
 
+    private EntityImpl getFinanceRole(){
+        EntityImpl financeRole = new EntityImpl("role", "Finance", roleAttrDefs);
+        financeRole.setInternalId("cn=Finance, ou=Roles, o=Jetspeed, o=sevenSeas");
+        financeRole.setAttribute(CN_DEF.getName(), "Finance");
+        Collection<String> members = new ArrayList<String>();
+        members.add(DnUtils.encodeDn("cn=David,o=Peoples,o=SanFrancisco,o=Jetspeed,o=sevenSeas"));
+        financeRole.setAttribute(UNIQUEMEMBER_ATTR_DEF.getName(), members);
+        return financeRole;
+    }
+
+    private EntityImpl getUsersRole(){
+        EntityImpl usersRole = new EntityImpl("role", "Users", roleAttrDefs);
+        usersRole.setInternalId("cn=Users, ou=Roles, o=Jetspeed, o=sevenSeas");
+        usersRole.setAttribute(CN_DEF.getName(), "Users");
+        Collection<String> members = new ArrayList<String>();
+        members.add(DnUtils.encodeDn("cn=David,o=Peoples,o=SanFrancisco,o=Jetspeed,o=sevenSeas"));
+        members.add(DnUtils.encodeDn("cn=Paul,o=People,o=Amsterdam,o=Jetspeed,o=sevenSeas"));
+        members.add(DnUtils.encodeDn("cn=Thomas,o=Peoples,o=Amsterdam,o=Jetspeed,o=sevenSeas"));
+        usersRole.setAttribute(UNIQUEMEMBER_ATTR_DEF.getName(), members);
+        return usersRole;
+    }
+
     public void testFetchRolesForUserByRoleAttribute() throws Exception
     {
-        EntityImpl managerRole = new EntityImpl("role", "manager", roleAttrDefs);
-        managerRole.setInternalId("cn=manager, ou=Roles, ou=rootOrg, o=sevenSeas");
-        managerRole.setAttribute(DESCRIPTION_ATTR_DEF.getName(), "Manager Role");
-        managerRole.setAttribute(CN_DEF.getName(), "manager");
-        managerRole.setAttribute(UID_DEF.getName(), "manager");
-
-        EntityImpl userRole = new EntityImpl("role", "user", roleAttrDefs);
-        userRole.setInternalId("cn=user, ou=Roles, ou=rootOrg, o=sevenSeas");
-        userRole.setAttribute(DESCRIPTION_ATTR_DEF.getName(), "User Role");
-        userRole.setAttribute(CN_DEF.getName(), "user");
-        userRole.setAttribute(UID_DEF.getName(), "user");
-
+        EntityImpl userRole = getUsersRole();
+        EntityImpl financeRole = getFinanceRole();
         Collection<Entity> resultSet = new ArrayList<Entity>();
-        resultSet.add(managerRole);
         resultSet.add(userRole);
-        
+        resultSet.add(financeRole);
         // test fetching roles for a user
         basicTestCases.testFetchRelatedEntitiesFrom("user", "role", "hasRole",
-                "someManager", resultSet);
+                "David", resultSet);
 
-        // .. next, test fetching users for a role using the same EntityRelationDAO
-        Entity user = createUser("someManager", 
-                "cn=someManager, ou=People, ou=rootOrg, o=sevenSeas",
-                 "Some Manager","someManager","someManager",new String[]{"manager","user"});
-        Entity jetspeed = createUser("jetspeed", 
-                "cn=jetspeed, ou=People, ou=rootOrg, o=sevenSeas",
-                 "jetspeed","jetspeed","jetspeed",new String[]{"manager"});
-        Entity admin = createUser("admin", 
-                "cn=admin, ou=People, ou=rootOrg, o=sevenSeas",
-                 "Admin","admin","admin",new String[]{"admin","manager","user"});
+
+    }
+    
+    private EntityImpl getGroup(String id, String description){
+        EntityImpl group = new EntityImpl("group", id, groupAttrDefs);
+        if (description != null){
+            group.setAttribute(DESCRIPTION_ATTR_DEF.getName(), description);
+        }
+        group.setAttribute(CN_DEF.getName(), id);
+        return group;
+    }
+    
+    public void testAddNestedEntities() throws Exception {
+        Entity marketingGroup = entityManager.getEntity("group", "Marketing");
         
+        assertNotNull(marketingGroup);
         
-        resultSet = new ArrayList<Entity>();
-        resultSet.add(user);
-        resultSet.add(jetspeed);
-        resultSet.add(admin);
-        basicTestCases.testFetchRelatedEntitiesTo("user", "role", "hasRole",
-                "manager", resultSet);
-
+        EntityImpl nestedGroup = getGroup("nestedGroup1", "Some Nested Group");
+        
+        entityManager.addEntity(nestedGroup, marketingGroup);
+        
+        Entity liveNestedGroup = entityManager.getEntity("group", nestedGroup.getId());
+        assertNotNull(liveNestedGroup);
+        String newDn = DnUtils.encodeDnUsingSeparator(",", marketingGroup.getInternalId(),
"cn="+liveNestedGroup.getId());
+        assertEquals("cn=nestedGroup1,cn=Marketing,ou=Groups,o=Jetspeed,o=sevenSeas", newDn);
     }
     
     private Entity createUser(String id, String internalId, String givenName, String cn,
String uid, String[] roles){
@@ -94,12 +109,6 @@
         user.setAttribute(GIVEN_NAME_DEF.getName(), givenName);
         user.setAttribute(CN_DEF.getName(), cn);
         user.setAttribute(UID_DEF.getName(), uid);
-        Collection<String> roleValues=new ArrayList<String>();
-        for (int i = 0; i < roles.length; i++)
-        {
-            roleValues.add(roles[i]);
-        }
-        user.setAttribute(J2_ROLE_DEF.getName(), roleValues);
         return user;
     }
 

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/mapping/ldap/setup2/resources/setup2.ldif
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/mapping/ldap/setup2/resources/setup2.ldif?rev=702908&r1=702907&r2=702908&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/mapping/ldap/setup2/resources/setup2.ldif
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/mapping/ldap/setup2/resources/setup2.ldif
Wed Oct  8 08:25:07 2008
@@ -1,295 +1,178 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# $Id$
-
 dn: o=sevenSeas
 objectClass: top
 objectClass: organization
 o: sevenSeas
 
-dn: ou=rootOrg,o=sevenSeas
-objectClass: organizationalUnit
-objectClass: top
-ou: rootOrg
-
-dn: ou=People,ou=rootOrg,o=sevenSeas
-objectClass: organizationalUnit
-objectClass: top
-ou: People
-
-dn: ou=Groups,ou=rootOrg,o=sevenSeas
-objectClass: organizationalUnit
-objectClass: top
-ou: Groups
-
-dn: ou=Roles,ou=rootOrg,o=sevenSeas
-objectClass: organizationalUnit
-objectClass: top
-ou: Roles
-
-dn: cn=accounting,ou=Groups,ou=rootOrg,o=sevenSeas
-objectClass: jetspeed-2-group
-objectClass: groupOfUniqueNames
-objectClass: top
-cn: accounting
-j2-classname: accounting
-uid: accounting
-uniqueMember: uid=accounting
-
-dn: cn=engineering,ou=Groups,ou=rootOrg,o=sevenSeas
-objectClass: jetspeed-2-group
-objectClass: groupOfUniqueNames
-objectClass: top
-cn: engineering
-j2-classname: engineering
-uid: engineering
-uniqueMember: uid=engineering
-
-dn: cn=marketing,ou=Groups,ou=rootOrg,o=sevenSeas
-objectClass: jetspeed-2-group
-objectClass: groupOfUniqueNames
-objectClass: top
-cn: marketing
-j2-classname: marketing
-uid: marketing
-uniqueMember: uid=marketing
-
-dn: cn=admin,ou=Roles,ou=rootOrg,o=sevenSeas
-objectClass: jetspeed-2-role
-objectClass: groupOfUniqueNames
+dn: cn=admin,o=sevenSeas
+objectClass: person
 objectClass: top
+objectClass: inetOrgPerson
+objectClass: organizationalPerson
 cn: admin
-j2-classname: admin
+sn: admin
 uid: admin
-uniqueMember: uid=admin
-
-dn: cn=manager,ou=Roles,ou=rootOrg,o=sevenSeas
-objectClass: jetspeed-2-role
-objectClass: groupOfUniqueNames
-objectClass: top
-cn: manager
-description: Manager Role
-j2-classname: manager
-uid: manager
-uniqueMember: uid=manager
-
-dn: cn=user,ou=Roles,ou=rootOrg,o=sevenSeas
-objectClass: jetspeed-2-role
-objectClass: groupOfUniqueNames
-objectClass: top
-cn: user
-description: User Role
-j2-classname: user
-uid: user
-uniquemember: uid=user
-uniquemember: uid=admin
-uniquemember: uid=manager
-uniquemember: uid=local
+userPassword:: cGFzczEyMw==
 
-dn: cn=guest,ou=Roles,ou=rootOrg,o=sevenSeas
-objectClass: jetspeed-2-role
-objectClass: groupOfUniqueNames
+dn: o=Jetspeed,o=sevenSeas
 objectClass: top
-cn: guest
-j2-classname: guest
-uid: guest
-uniquemember: uid=guest
+objectClass: organization
+o: Jetspeed
 
-dn: cn=subsite,ou=Roles,ou=rootOrg,o=sevenSeas
-objectClass: jetspeed-2-role
-objectClass: groupOfUniqueNames
+dn: o=Amsterdam,o=Jetspeed,o=sevenSeas
 objectClass: top
-cn: subsite
-j2-classname: subsite
-uid: subsite
-uniquemember: uid=subsite
+objectClass: organization
+o: Amsterdam
 
-dn: cn=subsite2,ou=Roles,ou=rootOrg,o=sevenSeas
-objectClass: jetspeed-2-role
-objectClass: groupOfUniqueNames
+dn: o=SanFrancisco,o=Jetspeed,o=sevenSeas
 objectClass: top
-cn: subsite2
-j2-classname: subsite2
-uid: subsite2
-uniquemember: uid=subsite
+objectClass: organization
+o: SanFrancisco
 
-dn: cn=dev,ou=Roles,ou=rootOrg,o=sevenSeas
-objectClass: jetspeed-2-role
-objectClass: groupOfUniqueNames
+dn: o=Peoples,o=SanFrancisco,o=Jetspeed,o=sevenSeas
 objectClass: top
-cn: dev
-j2-classname: dev
-uid: dev
-uniquemember: uid=dev
+objectClass: organization
+o: Peoples
 
-dn: cn=devmgr,ou=Roles,ou=rootOrg,o=sevenSeas
-objectClass: jetspeed-2-role
-objectClass: groupOfUniqueNames
+dn: cn=David,o=Peoples,o=SanFrancisco,o=Jetspeed,o=sevenSeas
+objectClass: person
 objectClass: top
-cn: devmgr
-j2-classname: devmgr
-uid: devmgr
-uniquemember: uid=devmgr
+objectClass: inetOrgPerson
+objectClass: organizationalPerson
+cn: David
+givenName: David
+sn: David
+uid: david
+userPassword:: cGFzcw==
 
-dn: cn=admin,ou=People,ou=rootOrg,o=sevenSeas
+dn: cn=John,o=SanFrancisco,o=Jetspeed,o=sevenSeas
+objectClass: inetOrgPerson
 objectClass: organizationalPerson
 objectClass: person
-objectClass: jetspeed-2-user
-objectClass: inetOrgPerson
 objectClass: top
-cn: admin
-givenname: Admin
-j2-role: admin
-j2-role: manager
-j2-role: user
-sn: admin
-uid: admin
-userpassword:: c2VjcmV0
+cn: John
+givenName: John
+sn: john
+uid: john
+userPassword:: cGFzcw==
 
-dn: cn=someManager,ou=People,ou=rootOrg,o=sevenSeas
+dn: cn=Jennifer,o=Peoples,o=SanFrancisco,o=Jetspeed,o=sevenSeas
+objectClass: inetOrgPerson
 objectClass: organizationalPerson
 objectClass: person
-objectClass: jetspeed-2-user
-objectClass: inetOrgPerson
 objectClass: top
-cn: someManager
-givenname: Some Manager
-j2-role: manager
-j2-role: user
-sn: someManager
-uid: someManager
-userpassword:: c2VjcmV0
+cn: Jennifer
+givenName: Jennifer
+sn: jennifer
+uid: jennifer
+userPassword:: cGFzcw==
 
-dn: cn=user,ou=People,ou=rootOrg,o=sevenSeas
+dn: cn=Lisa,o=Peoples,o=SanFrancisco,o=Jetspeed,o=sevenSeas
+objectClass: inetOrgPerson
 objectClass: organizationalPerson
 objectClass: person
-objectClass: jetspeed-2-user
-objectClass: inetOrgPerson
 objectClass: top
-cn: user
-givenname: User
-j2-role: user
-sn: user
-uid: user
-userpassword:: c2VjcmV0
+cn: Lisa
+givenName: Lisa
+sn: lisa
+uid: lisa
+userPassword:: cGFzcw==
 
-dn: cn=local,ou=People,ou=rootOrg,o=sevenSeas
-objectClass: organizationalPerson
-objectClass: person
-objectClass: jetspeed-2-user
-objectClass: inetOrgPerson
+dn: o=Peoples,o=Amsterdam,o=Jetspeed,o=sevenSeas
 objectClass: top
-cn: local
-givenname: Local
-j2-role: user
-sn: local
-uid: local
-userpassword:: c2VjcmV0
+objectClass: organization
+o: Peoples
 
-dn: cn=sublocal,ou=People,ou=rootOrg,o=sevenSeas
+
+dn: cn=Linda,o=Peoples,o=Amsterdam,o=Jetspeed,o=sevenSeas
+objectClass: inetOrgPerson
 objectClass: organizationalPerson
 objectClass: person
-objectClass: jetspeed-2-user
-objectClass: inetOrgPerson
 objectClass: top
-cn: sublocal
-givenname: sublocal
-j2-role: user
-sn: sublocal
-uid: sublocal
-userpassword:: c2VjcmV0
+cn: Linda
+givenName: Linda
+sn: linda
+uid: linda
+userPassword:: cGFzcw==
 
-dn: cn=tomcat,ou=People,ou=rootOrg,o=sevenSeas
+dn: cn=Robert,o=Peoples,o=Amsterdam,o=Jetspeed,o=sevenSeas
+objectClass: inetOrgPerson
 objectClass: organizationalPerson
 objectClass: person
-objectClass: jetspeed-2-user
-objectClass: inetOrgPerson
 objectClass: top
-cn: tomcat
-givenname: tomcat
-sn: tomcat
-uid: tomcat
-userpassword:: c2VjcmV0
+cn: Robert
+givenName: Robert
+sn: robert
+uid: robert
+userPassword:: cGFzcw==
 
-dn: cn=jetspeed,ou=People,ou=rootOrg,o=sevenSeas
+dn: cn=Mark,o=Peoples,o=Amsterdam,o=Jetspeed,o=sevenSeas
+objectClass: inetOrgPerson
 objectClass: organizationalPerson
 objectClass: person
-objectClass: jetspeed-2-user
-objectClass: inetOrgPerson
 objectClass: top
-cn: jetspeed
-givenname: jetspeed
-j2-role: manager
-sn: jetspeed
-uid: jetspeed
-userpassword:: c2VjcmV0
+cn: Mark
+givenName: Mark
+sn: mark
+uid: mark
+userPassword:: cGFzcw==
 
-dn: cn=guest,ou=People,ou=rootOrg,o=sevenSeas
+dn: cn=Paul,o=Peoples,o=Amsterdam,o=Jetspeed,o=sevenSeas
+objectClass: inetOrgPerson
 objectClass: organizationalPerson
 objectClass: person
-objectClass: jetspeed-2-user
-objectClass: inetOrgPerson
 objectClass: top
-cn: guest
-givenname: guest
-sn: guest
-uid: guest
-userpassword:: c2VjcmV0
+cn: Paul
+givenName: Paul
+sn: paul
+uid: paul
+userPassword:: cGFzcw==
 
-dn: cn=subsite,ou=People,ou=rootOrg,o=sevenSeas
+dn: cn=Thomas,o=Peoples,o=Amsterdam,o=Jetspeed,o=sevenSeas
+objectClass: inetOrgPerson
 objectClass: organizationalPerson
 objectClass: person
-objectClass: jetspeed-2-user
-objectClass: inetOrgPerson
 objectClass: top
-cn: subsite
-givenname: subsite
-j2-role: subsite
-j2-role: subsite2
-j2-role: user
-sn: subsite
-uid: subsite
-userpassword:: c2VjcmV0
+cn: Thomas
+givenName: Thomas
+sn: thomas
+uid: thomas
+userPassword:: cGFzcw==
 
-dn: cn=subsite2,ou=People,ou=rootOrg,o=sevenSeas
-objectClass: organizationalPerson
-objectClass: person
-objectClass: jetspeed-2-user
-objectClass: inetOrgPerson
+dn: ou=Roles,o=Jetspeed,o=sevenSeas
+objectClass: organizationalUnit
 objectClass: top
-cn: subsite2
-givenname: subsite2
-j2-role: subsite
-j2-role: subsite2
-j2-role: user
-sn: subsite2
-uid: subsite2
-userpassword:: c2VjcmV0
+ou: Roles
 
-dn: cn=devmgr,ou=People,ou=rootOrg,o=sevenSeas
-objectClass: organizationalPerson
-objectClass: person
-objectClass: jetspeed-2-user
-objectClass: inetOrgPerson
+
+dn: ou=Groups,o=Jetspeed,o=sevenSeas
+objectClass: organizationalUnit
 objectClass: top
-cn: devmgr
-givenname: devmgr
-j2-role: devmgr
-j2-role: dev
-j2-role: user
-sn: devmgr
-uid: devmgr
-userpassword:: c2VjcmV0
\ No newline at end of file
+ou: Groups
+
+dn: cn=Users,ou=Roles,o=Jetspeed,o=sevenSeas
+objectClass: extensibleObject
+objectClass: groupOfUniqueNames
+cn: Users
+uniqueMember: cn=David,o=Peoples,o=SanFrancisco,o=Jetspeed,o=sevenSeas
+uniqueMember: cn=Thomas,o=Peoples,o=Amsterdam,o=Jetspeed,o=sevenSeas
+
+dn: cn=Publishers,ou=Groups,o=Jetspeed,o=sevenSeas
+objectClass: extensibleObject
+objectClass: groupOfUniqueNames
+cn: Publishers
+uniqueMember: cn=Lisa,o=Peoples,o=SanFrancisco,o=Jetspeed,o=sevenSeas
+uniqueMember: cn=Thomas,o=Peoples,o=Amsterdam,o=Jetspeed,o=sevenSeas
+
+dn: cn=Finance,ou=Roles,o=Jetspeed,o=sevenSeas
+objectClass: extensibleObject
+objectClass: groupOfUniqueNames
+cn: Finance
+uniqueMember: cn=David,o=Peoples,o=SanFrancisco,o=Jetspeed,o=sevenSeas
+uniqueMember: cn=Linda,o=Peoples,o=Amsterdam,o=Jetspeed,o=sevenSeas
+uniqueMember: cn=Robert,o=Peoples,o=Amsterdam,o=Jetspeed,o=sevenSeas
+
+dn: cn=Marketing,ou=Groups,o=Jetspeed,o=sevenSeas
+objectClass: extensibleObject
+objectClass: groupOfUniqueNames
+cn: Marketing
+uniqueMember: cn=David,o=Peoples,o=SanFrancisco,o=Jetspeed,o=sevenSeas

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/etc/ldif/jetspeed-example.ldif
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/etc/ldif/jetspeed-example.ldif?rev=702908&r1=702907&r2=702908&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/etc/ldif/jetspeed-example.ldif
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/etc/ldif/jetspeed-example.ldif
Wed Oct  8 08:25:07 2008
@@ -150,18 +150,21 @@
 ou: Groups
 
 dn: cn=Users,ou=Roles,o=Jetspeed,o=sevenSeas
+objectClass: extensibleObject
 objectClass: groupOfUniqueNames
 cn: Users
 uniqueMember: cn=David,o=Peoples,o=SanFrancisco,o=Jetspeed,o=sevenSeas
 uniqueMember: cn=Thomas,o=Peoples,o=Amsterdam,o=Jetspeed,o=sevenSeas
 
 dn: cn=Publishers,ou=Groups,o=Jetspeed,o=sevenSeas
+objectClass: extensibleObject
 objectClass: groupOfUniqueNames
 cn: Publishers
 uniqueMember: cn=Lisa,o=Peoples,o=SanFrancisco,o=Jetspeed,o=sevenSeas
 uniqueMember: cn=Thomas,o=Peoples,o=Amsterdam,o=Jetspeed,o=sevenSeas
 
 dn: cn=Finance,ou=Roles,o=Jetspeed,o=sevenSeas
+objectClass: extensibleObject
 objectClass: groupOfUniqueNames
 cn: Finance
 uniqueMember: cn=David,o=Peoples,o=SanFrancisco,o=Jetspeed,o=sevenSeas
@@ -169,6 +172,7 @@
 uniqueMember: cn=Robert,o=Peoples,o=Amsterdam,o=Jetspeed,o=sevenSeas
 
 dn: cn=Marketing,ou=Groups,o=Jetspeed,o=sevenSeas
+objectClass: extensibleObject
 objectClass: groupOfUniqueNames
 cn: Marketing
 uniqueMember: cn=David,o=Peoples,o=SanFrancisco,o=Jetspeed,o=sevenSeas



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message