Author: bdaw
Date: 2012-01-05 15:05:23 -0500 (Thu, 05 Jan 2012)
New Revision: 8276
Modified:
portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/MembershipDAOImpl.java
Log:
GTNPORTAL-2321 Membership type 'JBOSS_IDENTITY_MEMBERSHIP' instead of
'member'
Modified:
portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/MembershipDAOImpl.java
===================================================================
---
portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/MembershipDAOImpl.java 2012-01-05
20:01:24 UTC (rev 8275)
+++
portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/MembershipDAOImpl.java 2012-01-05
20:05:23 UTC (rev 8276)
@@ -715,7 +715,17 @@
Group g =
((GroupDAOImpl)orgService.getGroupHandler()).convertGroup(role.getGroup());
m.setGroupId(g.getId());
m.setUserName(role.getUser().getId());
- m.setMembershipType(role.getRoleType().getName());
+
+ // LDAP store may return raw membership type as role type
+
if(role.getRoleType().getName().equals("JBOSS_IDENTITY_MEMBERSHIP"))
+ {
+
m.setMembershipType(orgService.getConfiguration().getAssociationMembershipType());
+ }
+ else
+ {
+ m.setMembershipType(role.getRoleType().getName());
+ }
+
memberships.add(m);
}
}