> Of course, none of these solutions tackle the "special cases" - eg people
> who
> are both staff and student. Not sure what we'll do there - probably just
> assign "staff" as thats generally the more-priveleged category. However,
> there
> will be a few resources that are student-only...
FWIW I mine "memberOf" (which is multivalued)
Attributes attributes =
dependencies.getConnectorResolution("directory");
Attribute affiliation = attributes.get("memberOf");
Enumeration members;
String memGroup="CN=Member,";
String staffGroup="CN=Staff,";
for (members = affiliation.getAll();
members.hasMoreElements();) {
String s = (String) members.next();
if
(memGroup.equalsIgnoreCase(s.substring(0,memGroup.length()))) {
resolverAttribute.addValue("member");
} else if
(staffGroup.equalsIgnoreCase(s.substring(0,staffGroup.length()))) {
resolverAttribute.addValue("staff");
}
}
/rod
|