Author: bdaw
Date: 2012-02-29 16:23:24 -0500 (Wed, 29 Feb 2012)
New Revision: 8507
Modified:
epp/portal/branches/EPP_5_2_Branch/component/identity/src/main/java/org/exoplatform/services/organization/idm/GroupDAOImpl.java
Log:
Bug 794428 Deleting a group causes IdentityException with openldap
Modified:
epp/portal/branches/EPP_5_2_Branch/component/identity/src/main/java/org/exoplatform/services/organization/idm/GroupDAOImpl.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/identity/src/main/java/org/exoplatform/services/organization/idm/GroupDAOImpl.java 2012-02-29
21:12:29 UTC (rev 8506)
+++
epp/portal/branches/EPP_5_2_Branch/component/identity/src/main/java/org/exoplatform/services/organization/idm/GroupDAOImpl.java 2012-02-29
21:23:24 UTC (rev 8507)
@@ -284,6 +284,23 @@
//TODO: impl force in IDM
getIdentitySession().getPersistenceManager().removeGroup(child, true);
}
+
+
+ // Obtain parents
+
+ Collection<org.picketlink.idm.api.Group> parents =
+ getIdentitySession().getRelationshipManager().findAssociatedGroups(jbidGroup,
null, false, false);
+
+ // not possible to disassociate only one child...
+ Set dummySet = new HashSet();
+ dummySet.add(jbidGroup);
+
+ for (org.picketlink.idm.api.Group parent : parents)
+ {
+ getIdentitySession().getRelationshipManager().disassociateGroups(parent,
dummySet);
+ }
+
+
}
catch (Exception e)
{