Author: bdaw
Date: 2012-02-17 11:40:24 -0500 (Fri, 17 Feb 2012)
New Revision: 8432
Modified:
portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/GroupDAOImpl.java
Log:
GTNPORTAL-2353 Unable to remove DB users if LDAP store is not read-only
Modified:
portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/GroupDAOImpl.java
===================================================================
---
portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/GroupDAOImpl.java 2012-02-17
16:05:56 UTC (rev 8431)
+++
portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/GroupDAOImpl.java 2012-02-17
16:40:24 UTC (rev 8432)
@@ -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)
{