Author: bdaw
Date: 2012-01-05 15:01:24 -0500 (Thu, 05 Jan 2012)
New Revision: 8275
Modified:
epp/portal/branches/EPP_5_2_Branch/component/identity/src/main/java/org/exoplatform/services/organization/idm/MembershipDAOImpl.java
Log:
JBEPP-1470 Membership type 'JBOSS_IDENTITY_MEMBERSHIP' instead of
'member'
Modified:
epp/portal/branches/EPP_5_2_Branch/component/identity/src/main/java/org/exoplatform/services/organization/idm/MembershipDAOImpl.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/identity/src/main/java/org/exoplatform/services/organization/idm/MembershipDAOImpl.java 2012-01-03
03:42:16 UTC (rev 8274)
+++
epp/portal/branches/EPP_5_2_Branch/component/identity/src/main/java/org/exoplatform/services/organization/idm/MembershipDAOImpl.java 2012-01-05
20:01:24 UTC (rev 8275)
@@ -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);
}
}
Show replies by date